program kon(input,output);
var  a1,a2,b1,b2:integer;
     c:boolean;
begin
  write('vvedite nach. koordinaty: ');read(a1,b1);
  write('vvedite konec. koordinaty: ');read(a2,b2);
  c:=(a1=a2+1)and(b1=b2+2)or(a1=a2+2)and(b1=B2+1)or(a1=a2-2)and(b1=b2-1)or
   (a1=a2-2)and(b1=b2+1)or(a1=a2-1)and(b1=B2+2)or(a1=a2-1)and(b1=b2-2)or
   (a1=a2+1)and(b1=b2-2)or(a1=a2+2)and(b1=b2-1);
  write(c)
end.