import java.util.Scanner; public class D { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { double x1 = cin.nextDouble(); double y1 = cin.nextDouble(); double x2 = cin.nextDouble(); double y2 = cin.nextDouble(); double x3 = cin.nextDouble(); double y3 = cin.nextDouble(); if (x1 == 0 && y1 == 0 && x2 == 0 && y2 == 0 && x3 == 0 && y3 == 0) break; double k1 = slope(x1, y1, x2, y2); double k2 = slope(x2, y2, x3, y3); double k3 = slope(x1, y1, x3, y3); if (k1 <= k2 && k2 <= k3) System.out.println(1); else System.out.println(0); } cin.close(); } private static double slope(double x1, double y1, double x2, double y2) { return Math.atan((y1 - y2) / (x1 - x2)); } }