#include <iostream>
#include <utility>

using namespace std;

typedef pair<int,int> point;

int SegmentsAreParallel(const point & i, const point & j, const point & k)
{
    int dx1, dy1, dx2, dy2;
    
    dx1 = j.first - i.first;
    dy1 = j.second - i.second;
    
    dx2 = k.first - i.first;
    dy2 = k.second - i.second;

    return dx1 * dy2 - dy1 * dx2 == 0;
}

int main()
{
  point p1(0, 0);
  point p2(1, 1);
  point p3(2, 2);
  point p4(-1, -1);
  point p5(1, -1);
  point p6(0, 10);
  point p7(0, 100);
  point p8(10, 0);
  point p9(100, 0);

  cout << SegmentsAreParallel(p1, p2, p3) << endl;
  cout << SegmentsAreParallel(p1, p2, p4) << endl;
  cout << SegmentsAreParallel(p1, p2, p5) << endl;
  cout << SegmentsAreParallel(p1, p6, p7) << endl;
  cout << SegmentsAreParallel(p1, p8, p9) << endl;
  cout << SegmentsAreParallel(p1, p6, p9) << endl;

  return 0;
}
