USES math;
CONST  fi=''; fo='';
VAR
   f:text;
   u,v,x,y,ds1,ds2,ds3:longint;

PROCEDURE  nhap;
  begin
    Assign(f,fi);reset(f);
      read(f,u,v,x,y);
    CLose(f);
  end;

PROCEDURE xuli;
  begin
  ds1:=2;
    if (u=x) or (v=y) then ds1:=1;
  ds2:=2;
   if (u+v+x+y) mod 2=1 then ds2:=0 else
    if (u-v=x-y) or (u+v=x+y) then ds2:=1;
  ds3:=max(abs(u-x),abs(v-y));

  end;

PROCEDURE ghira;
  begin
    Assign(f,fo);rewrite(f);
      writeln(f,ds1,' ',ds2,' ',ds3);
    Close(f);
  end;

BEGIN
  nhap;xuli;ghira;
END.

uses math;
const fin='';
      fout='';
var r1,r2,c1,c2:byte;
procedure nhap;
var f:text;
begin
        assign(F,fin);reset(f);
        readln(f,r1,c1,r2,c2);
        close(f);
end;
function rook:byte;
begin
        if (r1=r2)or(c1=c2) then
                rook:=1
        else
                rook:=2;
end;
function bishop:byte;
begin
        if (((r1+c1) mod 2=0)and((r2+c2) mod 2=0))or(((r1+c1) mod 2<>0)and((r2+c2) mod 2<>0)) then
                begin
                        if ((r1-c1)=(r2-c2))or((r1+c1)=(r2+c2)) then
                                bishop:=1
                        else
                                bishop:=2;
                end
        else
                exit(0);
end;
function king:byte;
begin
        king:=max(abs(r1-r2),abs(c1-c2));
end;
procedure xuat;
var g:text;
begin
        assign(g,fout);rewrite(g);
        write(g,rook,' ',bishop,' ',king);
        close(g);
end;
begin
        nhap;
        xuat;
end.

{$MODE OBJFPC}
Uses Math;
Const
  fi ='';
  fo ='';
Var
  r, c, r1, c1 : integer;
  rook, bishop, king : integer;

Procedure Enter;
Var
  f : text;
Begin
  Assign(f, fi); Reset(f);
  Readln(f, r, c, r1, c1);
  Close(f);
End;

Function SameR: Boolean;
Begin
  Result:=r=r1;
End;

Function SameC: Boolean;
Begin
  Result:=c=c1;
End;

Function SameK: Boolean;
Begin
  Result:=((r+c)=(r1+c1)) or ((r-c)=(r1-c1));
End;

Procedure Solve;
Begin
  If SameR or SameC then rook:=1
    Else rook:=2;
  If (r+c) mod 2<>(r1+c1) mod 2 then bishop:=0
    Else If SameK then bishop:=1
      Else bishop:=2;
  king:=max(abs(r-r1), abs(c-c1));
End;

Procedure Print;
Var
  f : text;
Begin
  Assign(f, fo); Rewrite(f);
  Writeln(f, rook,' ', bishop,' ', king);
  Close(f);
End;

BEGIN
  Enter;
  Solve;
  Print;
END.

uses math;

const fi = '';
      fo = '';

var r1,c1,r2,c2,tuong,xe,vua:longint;

procedure nhap;
begin
    assign(input,fi); reset(input);
    readln(r1,c1,r2,c2);
    close(input);
end;

procedure xulyxe;
begin
    if (r1=r2) or (c1=c2) then xe:=1 else xe:=2;
end;

procedure xulytuong;
var x1,y1,x2,y2,n,m:longint;
begin
    x1:=r1 mod 2;
    y1:=c1 mod 2;
    x2:=r2 mod 2;
    y2:=c2 mod 2;
    if ((x1=y1) and (x2=y2)) or ((x1<>y1) and (x2<>y2)) then
    begin
        n:=abs(r1-r2);
        m:=abs(c1-c2);
        if n=m then tuong:=1 else tuong:=2;
    end
    else tuong:=0;
end;

procedure xulyvua;
var n,m:longint;
begin
    n:=abs(r1-r2);
    m:=abs(C1-c2);
    vua:=max(n,m);
end;

procedure solve;
begin
    xulyxe;
    xulytuong;
    xulyvua;
end;

procedure xuat;
begin
    assign(output,fo); rewrite(output);
    write(xe,' ',tuong,' ',vua);
    close(output);
end;

begin
    nhap;
    solve;
    xuat;
end.

uses math;

type pp=record
         x,y:longint;
        end;

var k1,k2,x1,y1,x2,y2:longint;
    w:array[0..10,0..10] of longint;
    v:array[0..1001] of pp;

procedure t1;
var t:longint;
 begin
  t:=0;
  if (x1<>x2) then t:=t+1;
  if (y1<>y2) then t:=t+1;
  write(t,' ');
 end;

procedure tt(xx,yy,x1,y1:longint);
var x,y:longint;
 begin
  x:=xx+x1;
  y:=yy+y1;
  while (x>=1) and (x<=8) and
        (y>=1) and (y<=8) do
   begin
    if (w[x,y]=0) then begin
                        inc(k2);
                        v[k2].x:=x;
                        v[k2].y:=y;
                        w[x,y]:=w[xx,yy]+1;
                       end;
    x:=x+x1;
    y:=y+y1;
   end;

 end;

procedure t2;
var x,y:longint;
 begin
  k1:=1;
  k2:=1;
  v[1].x:=x1;
  v[1].y:=y1;
  w[x1,y1]:=1;

  while (k1<=k2) do
   begin
    x:=v[k1].x;
    y:=v[k1].y;
    tt(x,y,-1,-1);
    tt(x,y,-1,+1);
    tt(x,y,+1,-1);
    tt(x,y,+1,+1);

    inc(k1);
   end;

  write(w[x2,y2]-ord(w[x2,y2]>0),' ');
 end;

procedure t3;
 begin
  writeln(max(abs(x1-x2),abs(y1-y2)));
 end;

 begin
  read(x1,y1,x2,y2);
  t1;t2;t3;
  writeln;
 end.

Const
  fi='';//'1177.inp';
  fo='';//'1177.out';
Var
  r1,r2,c1,c2:longint;
  a1,a2,a3:longint;

PROCEDURE data;
Var
  f:text;
Begin
  assign(f,fi); reset(f);
  readln(f,r1,c1,r2,c2);
  close(f);
End;

FUNCTION max(a,b:longint):longint;
Begin
  if a>b then exit(a) else exit(b);
End;

PROCEDURE work;
Begin
  if (r1=r2) and (c1=c2) then exit;

  //King
  a3:=max(abs(r1-r2),abs(c1-c2));

  //Rook
  if (r1=r2) or (c1=c2) then a1:=1 else a1:=2;

  //Bishop
  if ((r1+c1) mod 2 <> (r2+c2) mod 2) then exit;
  if (r1+c1=r2+c2) or (r1-c1=r2-c2) then a2:=1 else a2:=2;
End;

PROCEDURE result;
Var
  f:text;
Begin
  assign(f,fo); rewrite(f);
  writeln(f,a1,' ',a2,' ',a3);
  close(f);
End;

BEGIN
  data;
  work;
  result;
END.

program bt1177;
uses math;
const
  FI='';
  FO='';
var
  f:text;
  xe,tuong,vua:longint;
  r1,r2,c1,c2:longint;

procedure doc;
begin
  assign(f,FI);
  reset(f);
  read(f,r1,c1,r2,c2);
  close(f);
end;

procedure xuli;
begin
  if (r1=r2) or (c1=c2) then xe:=1
  else xe:=2;

  if (r1+c1) mod 2= (r2+c2) mod 2 then
    if ((r1+c1)=(r2+c2)) or (r1-c1=r2-c2) then tuong:=1
    else tuong:=2
  else tuong:=0;

  vua:=max(abs(r1-r2),abs(c2-c1));

end;

procedure ghi;
begin
  assign(f,FO);
  rewrite(f);
  writeln(f,xe,' ',tuong,' ',vua);
  close(f);
end;

begin
  doc;
  xuli;
  ghi;
end.

var
   m:array [1..111,1..111] of integer;
   r1,r2,c1,c2,r,b,a,i,j,x,y,t,k,ans1,ans:integer;
begin
     read(r1,c1,r2,c2);

     if (r1=r2) or (c1=c2) then r:=1 else r:=2;

     if abs(r1-r2)=abs(c1-c2) then b:=1 else
     if (abs(r1-c1) mod 2=0) and (abs(r2-c2) mod 2=1) or
        (abs(r1-c1) mod 2=1) and (abs(r2-c2) mod 2=0) then b:=0 else b:=2;

     if (r1=r2) or (abs(r1-r2)=abs(c1-c2)) then k:=abs(c2-c1) else
     if c1=c2 then k:=abs(r1-r2) else
     begin
          k:=0; x:=r1-r2; y:=c1-c2;
          if x<0 then ans:=-1 else ans:=1;
          if y<0 then ans1:=-1 else ans1:=1;
          repeat
                r1:=r1-ans;
                c1:=c1-ans1;
                k:=k+1;
          until (r1=r2) or (c1=c2);
          if r1=r2 then k:=k+abs(c1-c2);
          if c1=c2 then k:=k+abs(r1-r2);
     end;

     write(r,' ',b,' ',k);
end.

uses math;
Var i,j,k,m,n,x2,y2,x,y,x1,y1:LongInt;
 Begin
  Read(x,y,x1,y1);
  if (x=x1) or (y=y1) then Write('1 ')
                     else Write('2 ');
  if ((x+y) mod 2)=((x1+y1) mod 2) then Begin
                                     if ABS(x-x1)=ABS(y-y1) then Write('1 ')
                                                            else Write('2 ');
                                    End
                               else Write('0 ');
  x2:=ABS(x-x1);
  y2:=ABS(y-y1);
  Write(max(x2,y2));
 End.

   const eps=0.00000001;  besk1=200000008;  nn=200000;
   label 1,2;
    type   { real=double;}  {string=ansistring;}
    mas=array [0..nn] of longint;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var p1,p2,p3,p4,t,l,ot,nm,n,s1,s2,m,s,imax,smin,cen,dl,t2,i1,p,prost,besk:int64;
    step, k,t1,ii,i,tt,j:longint;
     aa,bb,cc:real;
     a,b:array[-10..200000] of int64;
     dda,ddb:array[-10..1200,-10..1200] of int64;
     ss1,ss2:string;
    ss:string;ch:char;
    maxpr:array[0..nn] of string;
    st2:array[0..nn] of string;
     v0,v1,s0,t0:real;
     zv:point;
     xx,yy,y,x:array[-1..nn] of double;
     yot:double;
       flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:longint):longint;begin min:=x;if y<x then min:=y; end;
  function max(x,y:longint):longint;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

 function raz:int64;  var i,j:longint; t,t1:int64;
begin t:=0; t1:=0;
for i:=1 to n do t:=t+abs(a[2*i-1]-a[2*i]);
for  i:=1 to n do t1:=t1+(a[2*i-1]-a[2*i]);
raz:=t-abs(t1);
 end;

begin
   { assign (input,'F:\Projects\input.txt');reset(input);
      assign (output,'F:\Projects\output.txt'); rewrite(output);
    }
   read(p1,p2,p3,p4);

if (p1=p3)or(p2=p4) then write(1) else write(2);
write(' ');
if odd(p1+p2-(p3+p4)) then p:=0 else
   begin
      if ((p1+p2)=(p3+p4))or((p1-p2)=(p3-p4)) then p:=1 else p:=2;

   end;
write(p,' ');
writeln(max(abs(p1-p3),abs(p2-p4)));

   1:          close(output);
end.

program z1;
var
y1,y2,x2,x1:integer;
begin
read(y1,x1,y2,x2);

if (y1=y2) or (x1=x2) then write('1 ') else write('2 ');
if ((x1+y1) mod 2) <> ((x2+y2) mod 2) then write('0 ') else begin
   if (abs(x1-x2)=abs(y1-y2)) then write('1 ') else writeln('2 ');
end;
if (abs(x1-x2)>abs(y1-y2)) then write(abs(x1-x2)) else write(abs(y1-y2));
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if abs (abs(r2-r1+1)-abs(c2-c1+1)) mod 2 = 1 then
    k2:=0;
  {if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if (r1=r2) and (c1<>c2) then
    if abs(c2-c1)mod 2 = 0 then k2:=2;
   if (c1=c2) and (r1<>r2) then
    if abs(r2-r1)mod 2 = 0 then k2:=2;
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1;
  if (abs(r2-r1+1) mod 2 = 1) and (abs(c2-c1+1) mod 2 = 1) then k2:=2;}
  {while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);}
  if abs(r2-r1)<abs(c2-c1) then
    k3:=abs(c2-c1) else k3:=abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var a,b,c,d,e,f:longint;
function max(a,b:longint):longint;
begin
if a>b then exit(a) else exit(b);
end;
begin
read(a,b,c,d);
if (a=c) and (b=d) then
begin
writeln('0 0 0');
halt;
end;
if(a=c) or (b=d) then write(1,' ') else write(2,' ');
if((a+c+b+d) mod 2<>0) then write(0,' ') else
if((c-d)=(a-b))or((c+d)=(a+b)) then write(1,' ') else
write(2,' ');
writeln(max(abs(a-c),abs(b-d)));
end.

var x1,y1,x2,y2:integer;
x,y:integer;
function min(a,b:integer):integer;
begin
 if a<b then min:=a else min:=b;
end;

function max(a,b:integer):integer;
begin
 if a>b then max:=a else max:=b;
end;

begin
readln(x1,y1,x2,y2);
if (x1=x2) or (y1=y2) then write('1 ') else write('2 ');
if abs(x1-x2)=abs(y1-y2)
 then
  begin
   write('1 ');
  end
 else
  begin
   if (((x1 mod 2) = (x2 mod 2)) and (y1 mod 2 = y2 mod 2)) or
   ((x1 mod 2 <> x2 mod 2) and (y1 mod 2 <> y2 mod 2))
    then write('2 ')
    else write('0 ');
  end;
 x:=abs(x1-x2);
 y:=abs(y1-y2);
 writeln(min(x,y)+abs(x-y));
end.

var
  x1,y1,x2,y2,ans:longint;
begin
  readln(x1,y1,x2,y2);ans:=2;
  if x1=x2 then dec(ans);
  if y1=y2 then dec(ans);
  write(ans,' ');ans:=2;
  if x1-y1=x2-y2 then dec(ans);
  if x1+y1=x2+y2 then dec(ans);
  if (x1-y1-x2+y2) mod 2<>0 then ans:=0;
  if (x1+y1-x2-y2) mod 2<>0 then ans:=0;
  write(ans,' ');
  if abs(x1-x2)>abs(y1-y2) then writeln(abs(x1-x2)) else writeln(abs(y1-y2));
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n,m,k,j,i,h,x,y,y1,x1,k1:integer;
function min(x,y:Integer):integer;
begin
  if (x<y) then
    min:=x
  else
    min:=y;
end;
begin
  readln(x,y,x1,y1);
  if (x=x1) and (y=y1) then
    write(0,' ')
  else if (x=x1) or (y=y1) then
    write(1,' ')
  else
    write(2,' ');
  if (x=x1) and (y=y1) then
    write(0)
  else if (Abs(x-x1)=abs(y-y1)) then
    write(1)
  else
  begin
    if (x mod 2=1) then
    begin
      if (y mod 2=1) then
        k:=1
      else
        k:=2;
    end;
    if (x1 mod 2=1) then
    begin
      if (y1 mod 2=1) then
        k1:=1
      else
        k1:=2;
    end;
    if (x mod 2=0) then
    begin
      if (y mod 2=1) then
        k:=2
      else
        k:=1;
    end;
    if (x1 mod 2=0) then
    begin
      if (y1 mod 2=1) then
        k1:=2
      else
        k1:=1;
    end;
    if (k=k1) then
      write(2)
    else
      write(0);
  end;
  write(' ');
  write(abs(x-x1)+abs(y-y1)-min(abs(x-x1),abs(y-y1)));
  readln;
  readln;
end.

{$MODE OBJFPC}
var a,b,c,d:integer;o,t:boolean;
begin
 read(a,b,c,d);
 if (a=c) or (b=d) then write('1')
 else write('2');
 write(' ');
 if a mod 2=0 then
  begin
   if b mod 2 =0 then
    t:=true
   else t:=false;
  end
 else
  if b mod 2=0 then
   t:=false
  else t:=true;
 if c mod 2=0 then
  begin
   if d mod 2 =0 then
    o:=true
   else o:=false;
  end
 else
  if d mod 2=0 then
   o:=false
  else o:=true;
 if t<>o then write('0')
 else
  if abs(a-c)=abs(b-d) then
   write('1')
  else write('2');
 write(' ');
 if abs(a-c)>abs(b-d) then write(abs(a-c))
 else write(abs(b-d));
end.

{$APPTYPE CONSOLE}

uses
  SysUtils,math;
  const in_file='input.txt';
  const out_file='output.txt';
  var
  i,j,n,m,k,ans,r1,c1,r2,c2,r,c:longint;
  flag:boolean;
  a:array[1..8,1..8] of integer;

begin
//assign(input,in_file); reset(input);
//assign(output,out_file); rewrite(output);
fillchar(a,sizeof(a),0);

a[1,1]:=1;
for i:=2 to 8 do
begin
if (a[1,i-1]=1) then a[1,i]:=0 else a[1,i]:=1;
end;
for i:=2 to 8 do
begin
 for j:=1 to 8 do
 begin
  if (a[i-1,j]=1) then a[i,j]:=0 else a[i,j]:=1;
 end;
end;
readln(r1,c1,r2,c2);
if ((r1=r2)or(c1=c2)) then write(1,' ') else write(2,' ');
 flag:=false;
 r:=r1;
 c:=c1;
 while (r>0)and(c>0) do
 begin
  if (r=r2)and(c=c2) then flag:=true;
  r:=r-1;
  c:=c-1;
 end;

 r:=r1;
 c:=c1;
 while (r<=8)and(c>0) do
 begin
  if (r=r2)and(c=c2) then flag:=true;
  r:=r+1;
  c:=c-1;
 end;

 r:=r1;
 c:=c1;
 while (r>0)and(c<=8) do
 begin
  if (r=r2)and(c=c2) then flag:=true;
  r:=r-1;
  c:=c+1;
 end;

 r:=r1;
 c:=c1;
 while (r<=8)and(c<=8) do
 begin
  if (r=r2)and(c=c2) then flag:=true;
  r:=r+1;
  c:=c+1;
 end;

 if (flag) then write(1,' ') else
 begin
  if (a[r1,c1]<>a[r2,c2]) then  write(0,' ') else write(2,' ');
 end;

 r:=abs(r1-r2);
 c:=abs(c1-c2);
 ans:=0;
 ans:=max(r,c);
 writeln(ans);
 readln;
 readln;

//close(output);
//close(input);
end.

var
 y1,x1,y2,x2:longint;
function max(a,b:longint):longint;
begin
 if a>b then max:=a else max:=b;
end;
begin
 readln(y1,x1,y2,x2);
 if (x1=x2)and(y1=y2) then write(0);
 if (x1=x2)xor(y1=y2) then write(1);
 if (x1<>x2)and(y1<>y2) then write(2);
 if odd(y1+x1)<>odd(x2+y2) then write(' 0') else
 begin
  if (x1+y1=x2+y2)and(y1-x1=y2-x2) then write(' 0')else
  if (y1+x1=y2+x2)xor(y1-x1=y2-x2) then write(' 1') else write(' 2');
 end;
 writeln(' ',max(abs(x1-x2),abs(y1-y2)));
end.

uses math;
var a,b, c,d: LongInt;
begin
  Readln(a,b,c,d);

  if (a=c) or (b=d) then Write('1 ') else Write('2 ');

  if ((a+b) mod 2 = 0) and ((c+d) mod 2 = 0) or ((a+b) mod 2 <> 0) and ((c+d) mod 2 <> 0) then
  begin
    if abs(a-c) = abs(b-d) then Write('1 ') else Write('2 ');
  end else Write('0 ');

  Writeln(max(abs(a-c), abs(b-d)));
end.

{$MODE OBJFPC}
uses
  math;
const
  fi = 'INPUT.INP';
  dx : array[1..8] of Integer = (1, 1, 1, 0, 0, -1, -1, -1);
  dy : array[1..8] of Integer = (0, 1, -1, 1, -1, 0, 1, -1);
var
  qx, qy : array[0..90] of Integer;
  r1, c1, r2, c2, front, rear : Integer;
  d : array[0..10,0..10] of Integer;

procedure bfs;
var
  i, j, u, v: Integer;
begin
  for i := 0 to 9 do
    begin
      d[i,0] := -1;
      d[0,i] := -1;
      d[i,9] := -1;
      d[9,i] := -1;
    end;
  front := 1; rear := 1;
  qx[1] := r1; qy[1] := c1; d[r1,c1] := 1;
  while front <= rear do
    begin
      u := qx[front]; v := qy[front]; inc(front);
      for i := 1 to 8 do
        if d[u + dx[i], v + dy[i]] = 0 then
          begin
            d[u + dx[i] , v + dy[i]] := d[u,v] + 1;
            inc(rear); qx[rear] := u + dx[i]; qy[rear] := v + dy[i];
          end;
    end;
  writeln(d[r2,c2] - 1,' ');
end;

procedure enter;
var
  i, j : Integer;
begin
  //assign(input,fi); reset(input);
  read(r1, c1, r2, c2);
  if (r1 = r2) or (c1 = c2) then write(1,' ') else write(2,' ');
  if (r1 + c1) mod 2 <> (r2 + c2) mod 2 then write(0,' ')
    else
      if ((r1 + c1) = (r2 + c2)) or ((r1 - c1) = (r2 - c2)) then write(1,' ')
        else write(2,' ');
  bfs;
end;

begin
  enter;
end.

var
  x1,x2,y1,y2:longint;
  ans1,ans2,ans3:longint;

function max(a,b:longint):longint;
begin
  if a > b
  then exit(a)
  else exit(b);
end;

begin
  //Come and hack me if you can!
  read(x1,y1,x2,y2);
  if (x2 - x1) * (y2 - y1) = 0
  then ans1:=1
  else ans1:=2;
  if ((x1 + y1) mod 2) <> ((x2 + y2) mod 2)
  then ans2:=0
  else
  begin
    if (x1 - y1 = x2 - y2) or (abs(x1 + y1) = abs(x2 + y2))
    then ans2:=1
    else ans2:=2;
  end;
  ans3:=max(abs(x1-x2),abs(y1-y2));
  if abs(x1 - x2) + abs(y1 - y2) = 0 then
  begin
    ans1:=0;
    ans2:=0;
    ans3:=0;
  end;
  writeln(ans1,' ',ans2,' ',ans3);
  //NEW
end.

var     r1,c1,r2,c2,x,t,v : byte;
begin
        readln(r1,c1,r2,c2);

        if (r1=r2) or (c1=c2) then x := 1 else x := 2;

        if (r1+c1) mod 2 <> (r2+c2) mod 2 then t := 0 else begin
                if abs(r1-r2) = abs(c1-c2) then t := 1 else t := 2;
        end;

        if abs(r1-r2) > abs(c1-c2) then v := abs(r1-r2) else v := abs(c1-c2);

        writeln(x,' ',t,' ',v);
end.

var a,b,c,n,r1,c1,r2,c2,i,j:longint;

function max(a1,a2:longint):longint;
begin
max:=a1;
if a2>a1 then max:=a2;
end;

begin
readln(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then a:=1 else a:=2;
if (r1+c1) mod 2 <> (r2+c2) mod 2 then b:=0 else
if abs(r1-r2)=abs(c1-c2) then b:=1 else b:=2;
c:=max(abs(r1-r2),abs(c1-c2));
writeln(a,' ',b,' ',c);
end.

var r1,c1,r2,c2:byte;
begin
    readln(r1,c1,r2,c2);
    if (r1=r2)or(c1=c2) then
        write('1 ')
    else
        write('2 ');
    if abs((r1+c1)-(r2+c2))mod 2=1 then
        write('0 ')
    else
        if abs(r2-r1)=abs(c2-c1) then
            write('1 ')
        else
            write('2 ');
    if abs(r2-r1)>=abs(c2-c1) then
        write(abs(r2-r1))
    else
        write(abs(c2-c1));
    readln;
end.

var a,b,c,d:longint;
function max(a,b:longint):Longint;
begin
  max:=a;
  if b>a then max:=b;
end;
begin
  readln (a,b,c,d);
  //
  if (a=c) or (b=d) then write ('1 ') else write ('2 ');
  //
  if ((a+b) mod 2<>(c+d) mod 2) then write ('0 ') else
   begin
     if (a+b=c+d) or (a-b=c-d) then write ('1 ') else write ('2 ');
   end;
  //
  write (max(abs(c-a),abs(d-b)));
end.

program sdjkj;
uses math;
var x1, y1, x2, y2: integer;
    sl, lad, king, t: integer;
function isBlack(x: integer; y: integer):boolean;
begin
  if ((x mod 2 = 0) and (y mod 2 <> 0))
     or
     ((x mod 2 <> 0) and (y mod 2 = 0))
  then isBlack := true else isBlack := false;
end;

begin
  read(x1, y1, x2, y2);
  x1 := x1 - 1;
  x2 := x2 - 1;
  y1 := y1 - 1;
  y2 := y2 - 1;

  if( isBlack(x1, y1) <> isBlack(x2, y2) ) then sl := 0 else
  begin
    if ((x1 - y1) = (x2 - y2)) or ((x1 + y1) = (x2 + y2)) then sl := 1 else sl := 2;
  end;
  //writeln(sl);

  if (x1 = x2) or (y1 = y2) then lad := 1 else lad := 2;
  if (x1 = x2) or (y1 = y2) then king := abs(x2-x1) + abs(y2-y1) else
  begin
    t := (min(abs(x2-x1), abs(y2-y1)));
    king := t + abs(x2-x1)-t + abs(y2-y1)-t;
  end;
  write(lad, ' ', sl, ' ', king);
end.

program zzz;
 var x1,x2,y1,y2:longint;
 function max(x,y:longint):longint;
 begin
  if x>y then max:=x else max:=y;
 end;

 begin

  read(x1,y1,x2,y2);
  if (x1=x2) or(y2=y1) then write(1,' ') else write(2,' ');

  if (x2-y2 = x1-y1) or (x2+y2=x1+y1) then write('1 ')
  else if ((x1+y1) mod 2) <> ((x2+y2) mod 2) then write('0 ')
  else write('2 ');

  write(max(abs(x1-x2),abs(y1-y2)));

 end.

uses math;
var
  x,y,x1,x2,y1,y2,a1,a2,a3,q : longint;

begin
  readln(x1,y1,x2,y2);
  if (x1 <> x2) then inc(a1);
  if (y1 <> y2) then inc(a1);
  if (abs(x1-x2) = abs(y1-y2)) then a2:=1 else begin
    x:=x1; y:=y1;
    while (x <= 8) and (y <= 8) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      inc(x);
      inc(y);
    end;
    x:=x1; y:=y1;
    while (x <= 8) and (y >= 1) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      inc(x);
      dec(y);
    end;
    x:=x1; y:=y1;
    while (x >= 1) and (y <= 8) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      dec(x);
      inc(y);
    end;
    x:=x1; y:=y1;
    while (x >= 1) and (y >= 1) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      dec(x);
      dec(y);
    end;
  end;
    writeln(a1,' ',a2,' ',max(abs(x1-x2),abs(y1-y2)));
end.

var
a,b,c,d,sum1,sum2,sum3:longint;
begin
readln(a,b,c,d);
if (a=c) and (b=d) then
sum1:=0;
if (a<>c) and (b<>d) then
sum1:=2;
if (a<>c) and (b=d) then
sum1:=1;
if (a=c) and (b<>d) then
sum1:=1;
if ((a=c) and (b=d)) or (((a+b) mod 2)<>((c+d) mod 2)) then
sum2:=0
else
if abs(a-c)=abs(b-d) then
sum2:=1
else
sum2:=2;
if abs(a-c)>abs(b-d) then
sum3:=abs(a-c)
else
sum3:=abs(b-d);
writeln(sum1,' ',sum2,' ',sum3);
end.

Program A217;
Uses    math;
Const   finp='';//a217.inp';
        fout='';//a217.out';
Var     fi,fo:text;
        c1,r1,c2,r2 :longint;

BEGIN
        assign(fi,finp);reset(fi);
        assign(fo,fout);rewrite(fo);
        read(fi,r1,c1,r2,c2);
        if (r1=r2)and(c1=c2) then write(fo,'0 0 0')
        else
            begin
        if (r1=r2) or (c1=c2) then write(fo,'1 ') else write(fo,'2 ');
        if (r1+c1)mod 2<>(r2+c2) mod 2 then write(fo,'0 ')
        else
            if (r1+c1=r2+c2) or (r1-c1=r2-c2) then write(fo,'1 ') else write(fo,'2 ');
        write(fo,max(abs(r2-r1),abs(c2-c1)));
            end;
        close(fi); close(fo);
END.

Uses math;
Var i1,i2,j1,j2:longint;
begin
  //Assign(input,'input.txt'); reset(input);
  //Assign(output,'output.txt'); rewrite(output);
  read(i1,j1,i2,j2);
  if (i1=i2)and(j1=j2)
  then begin
        writeln(0,' ',0,' ',0);
        halt(0)
       end;
  if (i1=i2)or(j1=j2)
  then write(1,' ')
  else write(2,' ');
  if (i1 mod 2+j1 mod 2)mod 2<>(i2 mod 2+j2 mod 2)mod 2
  then write(0,' ')
  else begin
        if (i1-j1=i2-j2)or(-i1-j1=-i2-j2)
        then write(1,' ')
        else write(2,' ');
       end;
  writeln(max(abs(i1-i2),abs(j1-j2)))
end.

uses    math;
const
        finp = '';
        fout = '';
var     color : array [0 .. 8, 0 .. 8] of longint;
        i, j, r1, r2, c1, c2, resr, resb, resk : longint;
        f, g : text;
begin
        assign(f, finp); reset(f);
        assign(g, fout); rewrite(g);
        for i := 1 to 8 do
                begin
                        color[i][1] := 1 - color[i - 1][1];
                        for j := 2 to 8 do
                                color[i][j] := 1 - color[i][j - 1];
                end;
        readln(f, r1, c1, r2, c2);
        if (r1 = r2) or (c1 = c2) then resr := 1
        else resr := 2;
        if color[r1][c1] <> color[r2][c2] then resb := 0
        else
                if abs(r1 - r2) = abs(c1 - c2) then resb := 1
                else resb := 2;
        resk := abs(c1 - c2);
        resk := max(0, abs(r1 - r2) - resk) + resk;
        writeln(g, resr, ' ', resb, ' ', resk);
        close(f); close(g);
end.

uses math;
var n,m,x1,x2,y1,y2,xe,t,k:longint;
procedure nhap;
var i,j:longint;
  begin
    readln(x1,y1,x2,y2);
  end;
procedure viet;
var i,j:longint;
  begin
    writeln(xe,' ',t,' ',k);
  end;
procedure xuly;
var i,j:longint;
  begin
    if (x1=x2)or(y1=y2) then xe:=1 else xe:=2;
    if (x1+y1+x2+y2) mod 2=1 then t:=0
    else if (x1+y1=x2+y2)or(x1-y1=x2-y2) then t:=1
    else t:=2;
    k:=max(abs(x1-x2),abs(y1-y2));
  end;
begin
  assign(input,'');reset(input);
  assign(output,'');rewrite(output);
    nhap;
    xuly;
    viet;
  close(input);
  close(output);
end.

Program A_Chess;
var
   r1,c1,r2,c2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;

if (a mod 2=0) and (b mod 2<>0) then  //black
   h:=true;

if (a mod 2<>0) and (b mod 2=0) then  //white
   h:=true;

if a=b then
  if a mod 2<>0 then
    h:=false;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));  //dlia king'a

if (r1=r2) and (c1=c2) then
  begin
  L:=0; S:=0; K:=0;
  end;

writeln(l,' ',S,' ',K,' ');
end.

PROGRAM coj1177;
USES math;
CONST                     fi='';
                          fo='';
VAR  x,y,a,b,ds1,ds2,ds3:longint;
     f:text;
PROCEDURE nhap;
  Var  i,j:longint;
  Begin
    assign(f,fi); reset(f);
    readln(f,a,b,x,y);
    close(f);
  End;
PROCEDURE xuly;
  Var  i,j:longint;
  Begin
    if (a=x) or (b=y) then ds1:=1 else ds1:=2;
    if ((a+b)-(x+y)) mod 2 = 0 then
      if abs(a-x)=abs(b-y) then ds2:=1 else ds2:=2
    else ds2:=0;
    ds3:=max(abs(a-x),abs(b-y))
  End;
PROCEDURE inkq;
  Var  i,j:longint;
  Begin
    assign(f,fo); rewrite(f);
    writeln(f,ds1,' ',ds2,' ',ds3);
    close(f);
  End;
BEGIN
  nhap;
  xuly;
  inkq;
END.

Uses math;
Const
  fi= '';//1177.in';
  fo= '';//1177.out';

Var
  r1, c1, r2, c2: longint;

Procedure reads;
Begin
  read(r1,c1,r2,c2);
End;

Procedure process;
Var
  res: longint;
Begin
  // Xe
  if (r1- r2= 0) or (c1-c2=0) then write(1,' ')
    else write(2,' ');

  // Tuong
  if (r1+c1= r2+c2) or (r1-c1= r2- c2) then write(1,' ')
  else
    if ((r1+c1) mod 2)<> ((r2+ c2) mod 2) then write(0,' ')
    else write(2,' ');

  // Vua
  writeln(max(abs(r2-r1),abs(c2-c1)));
End;

Begin
  assign(input,fi); reset(input);
  assign(output,fo); rewrite(output);
    reads;
    process;
  close(input); close(output);
End.

program coj1177;
uses math;
const
  fi = '';//coj.in';
  fo = '';//coj.out';
var
  f:text;
  r1,c1,r2,c2:longint;

procedure doc;
begin
  assign(f,fi);reset(f);
  readln(f,r1,c1,r2,c2);
  close(f);
end;

procedure xuli;
begin
  assign(f,fo);rewrite(f);
  if (r1 = r2) or (c1 = c2) then write(f,1,' ')
  else write(f,2,' ');
  if (r1+r2+c1+c2) mod 2 = 1 then write(f,0,' ')
  else
    begin
      if ((r1+c1) = (r2+c2)) or ((r1-c1) = (r2-c2)) then write(f,1,' ')
      else write(f,2,' ');
    end;
  writeln(f,max(abs(r1-r2),abs(c1-c2)));
  close(f);
end;

begin
  doc;
  xuli;
end.

{$MODE OBJFPC}
{$R-,Q-}

const
  fi = 'A.INP';

var
  r, b, k : integer;
  x1, x2, y1, y2 : integer;

begin
{$IFNDEF ONLINE_JUDGE}
  assign(input,fi); reset(input);
{$ENDIF}
  readln(x1, y1, x2, y2);
  if (x1 = x2) and (y1 = y2) then
    begin
      writeln('0 0 0');
      halt;
    end;
  if (x1 = x2) or (y1 = y2) then
    r := 1
  else
    r := 2;
  b := 0;
  if (x1 - y1 = x2 - y2) or (x1 + y1 = x2 + y2) then
    b := 1
  else
    if ((x1 + y1) and 1) <> ((x2 + y2) and 1) then b := 0
    else
      b := 2;
  if abs(x1 - x2) <= abs(y1 - y2) then
    k := abs(y1 - y2)
  else
    k := abs(x1 - x2);
  writeln(r,' ',b,' ',k);
end.

uses math;
  var x1 , y1 , x2 , y2 , i , j , p : longint;
      a : array[1 .. 8 , 1.. 8] of longint;

BEGIN

  readln(x1 , y1 , x2 , y2);
  for i := 1 to 8 do begin
   if odd(i) then p := 1
     else p := 2;
  for j := 1 to 8 do begin
    a[i , j] := p;
    p := p mod 2 + 1;
  end;
  end;

    if (x1 = x2) or (y1 = y2) then write(1 , ' ')
      else write(2 , ' ');

   if a[x1 , y1] <> a[x2 , y2] then write(0 , ' ') else begin
    if abs(x1 - x2) = abs(y1 - y2) then write(1 , ' ')
      else write(2 , ' ');
   end;

  write(max(abs(x1 - x2) , abs(y1 - y2)));

END.

uses math;

var r1,c1,r2,c2:longint;

begin
  readln(r1,c1,r2,c2);
  if (r1=r2) or (c1=c2) then write(1,' ')
  else write(2,' ');
  if (r2-c2 = r1 - c1) or (r2+c2=r1+c1) then write('1 ')
  else if ((r1+c1) mod 2) <> ((r2+c2) mod 2) then write('0 ')
  else write('2 ');
  write(max(abs(r2-r1),abs(c2-c1)));
end.

uses math;
var
  r1,c1,r2,c2:longint;
  ans1,ans2,ans3:longint;
begin
  read(r1,c1,r2,c2);
  if (r1=r2) and (c1=c2) then begin writeln(0,' ',0,' ',0); halt; end;

  if (r1=r2)  or (c1=c2) then ans1:=1
  else ans1:=2;

       if (r1+c1)mod 2<>(r2+c2)mod 2 then ans2:=0
  else if abs(r1-r2)-abs(c1-c2)=0   then ans2:=1
  else                                    ans2:=2;

  ans3:=max(abs(r2-r1),abs(c2-c1));
  writeln(ans1,' ',ans2,' ',ans3);
end.

uses math;
const fin='';
        fout='';
var r1,c1,r2,c2:longint;
begin
        assign(input,fin);reset(input);
        assign(output,fout);rewrite(output);
        read(r1,c1,r2,c2);
        if r1=r2 then
                begin
                if c1=c2 then write(0,' ')
                else write(1,' ');
                end
        else
        if c1=c2 then
                begin
                if r1=r2 then write(0,' ')
                else write(1,' ');
                end
        else write(2,' ');
        if abs(r2-r1)=abs(c2-c1) then write(1,' ')
        else
                begin
                if (r2+c2) mod 2<>(r1+c1) mod 2 then write(0,' ')
                else write(2,' ');
                end;
        if r1=r2 then
                begin
                if c1=c2 then write(0,' ')
                else write(abs(c2-c1),' ');
                end
        else
        if c1=c2 then
                begin
                if r1=r2 then write(0,' ')
                else write(abs(r2-r1),' ');
                end
        else
                begin
                write(max(abs(r2-r1),abs(c2-c1)));
                end;
end.

var r1,r2,c1,c2,s,k:int64;
begin
 readln(r1,c1,r2,c2);
 if r1<>r2 then inc(k);
 if c1<>c2 then inc(k);
 write(k,' ');
 if (abs(r1-r2) mod 2)<>(abs(c1-c2) mod 2) then
  write(0,' ')
 else
 begin
  if (r1=r2) and (c1=c2) then write(0,' ')
  else
  begin
   if abs(r1-r2)=abs(c1-c2) then
    write(1,' ')
   else
    write(2,' ');
  end;
 end;
 s:=abs(abs(r1-r2)-abs(c1-c2));
 if abs(r1-r2)>abs(c1-c2) then
  s:=s+abs(c1-c2)
 else
  s:=s+abs(r1-r2);
 writeln(s);
end.

Program a370;
uses math;
const   fi                      =       '';
        fo                      =       '';
var     f                       :       text;
        r1,c1,r2,c2             :       longint;
BEGIN
        READ(r1,c1,r2,c2);
        If (r1=r2) and (c1=c2) then
             begin
                write(0,' ',0,' ',0);
                halt;
             end;
        If (r1=r2) or (c1=c2) then write (1,' ') else write(2,' ');
        IF ((r1+c1) mod 2) <> ((r2+c2) mod 2) then write(0,' ')
         else
          if ((r1-c1) = (r2-c2)) or (r1+c1=r2+c2) then write(1,' ')
           else write(2,' ');
        write(max(abs(r1-r2),abs(c1-c2)));
END.

uses math;
var r1,c1,r2,c2:byte;
begin
        read(r1,c1,r2,c2);
        if (r1=r2) or (c1=c2) then write('1 ')
        else write('2 ');
        if (c2-r2=c1-r1) or (r2+c2=r1+c1) then write('1 ')
        else if ((r1 mod 2=c1 mod 2) and (r2 mod 2=c2 mod 2)) or ((r1 mod 2<>c1 mod 2) and (r2 mod 2<>c2 mod 2)) then write('2 ')
        else write('0 ');
        write(max(abs(r1-r2),abs(c1-c2)))
end.

uses math;
var
 r1,c1,r2,c2:longint;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2)or(c1=c2) then write('1 ')
  else write('2 ');
 if (r1+c1=r2+c2)or(r1-c1=r2-c2) then write('1 ')
  else if not((r1+c1) mod 2=(r2+c2) mod 2) then write('0 ')
   else write('2 ');
 write(max(abs(r1-r2),abs(c1-c2)));
end.

program codeforces;

(* Main code is here ... *)

var
	t, r1, r2, c1, c2 : integer;
begin
	read(r1, c1, r2, c2);
	if (r1 = r2) and (c1 = c2) then
	begin
		writeln(0, ' ', 0, ' ', 0);
		exit;
	end;
	(* Rook *)
	t := 0;
	if r1 <> r2 then t := t+1;
	if c1 <> c2 then t := t+1;
	write(t, ' ');
	(* Bishop *)
	t := 2;
	if abs(r1-r2) = abs(c1-c2) then t := 1;
	if (abs(r1-r2)+abs(c1-c2)) mod 2 = 1 then t := 0;
	write(t, ' ');
	(* King *)
	t := 0;
	if abs(r1-r2) > abs(c1-c2) then
		t := abs(r1-r2)
	else
		t := abs(c1-c2);
	write(t);
	writeln();
end.

uses math;
var
  sx,sy,fx,fy,k,l,s,delta,i,j,nx,ny : longint;
  color : array [0..200,0..200] of longint;
  found : boolean;
  procedure check(x,y : longint);
  begin
    if (x=fx) and (y=fy) then found:=true;
  end;
begin
  readln(sx,sy,fx,fy);
  for i:=1 to 8 do
    for j:=1 to 8 do
      color[i][j]:=(i+j) mod 2;
  if color[sx][sy]<>color[fx][fy] then s:=0 else
  begin
    found:=false;
    for delta:=1 to 100 do
    begin
      nx:=sx+delta; ny:=sy+delta;
      check(nx,ny);
      nx:=sx-delta; ny:=sy+delta;
      check(nx,ny);
      nx:=sx+delta; ny:=sy-delta;
      check(nx,ny);
      nx:=sx-delta; ny:=sy-delta;
      check(nx,ny);
    end;
    if found then s:=1 else s:=2;
  end;
  k:=max(abs(sx-fx),abs(sy-fy));
  if (sx=fx) or (sy=fy) then l:=1 else l:=2;
  writeln(l,' ',s,' ',k);
end.

program sss;
var a,b,c,d:longint;
function max(x,y:longint):longint;
begin
        if x>y then exit(x);
        exit(y);
end;
begin
        readln(a,b,c,d);

        if (a=c)or(b=d) then write(1,' ')
        else write(2,' ');

        if (a+b)mod 2=(c+d)mod 2 then
        begin
                if abs(a-c)=abs(b-d) then write(1,' ')
                else write(2,' ');
        end
        else write(0,' ');

        writeln(max(abs(a-c),abs(b-d)));

end.

var  x1,x2,y1,y2:longint;
function max(a,b:longint):longint;
begin
if a>b then max:=a else max:=b;
end;
begin
{assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output); }
readln(x1,y1,x2,y2);
if (x1=x2) and (y1=y2) then begin writeln('0 0 0 '); halt; end;
if (x1=x2) or (y1=y2) then write('1 ') else write('2 ');
if ((x1 mod 2 = y1 mod 2) and (x2 mod 2<>y2 mod 2))or ((x1 mod 2 <> y1 mod 2) and (x2 mod 2=y2 mod 2))then write('0 ')
                                                  else if abs(x1-x2)=abs(y1-y2) then write('1 ') else write('2 ');
write(max(abs(x1-x2),abs(y1-y2)));

{close(input);
close(output);  }
end.

{$MODE OBJFPC}
program proA370;
uses
  math;
const
  fi = 'proA370.inp';
var
  r1, c1, r2, c2 : Integer;

begin
  {$ifndef online_judge}
  assign(input, fI); reset(input);
  {$endif}
  readln(r1, c1, r2, c2);

  if (r1 = r2) or (c1 = c2) then write(1,' ') else write(2,' ');

  if (r1 - c1 = r2 - c2) or (r1 + c1 = r2 + c2) then write(1,' ') else
  if ((r1 + c1 + r2 + c2) mod 2 = 0) then write(2,' ') else write(0,' ');
  writeln(min( abs(r1 - r2) + Min( abs(c2 - (r2 - r1 + c1)), abs(c2 - (r1 + c1 - r2) ) ) , abs(c1 - c2) + Min(abs(r2 - (r1 - c1 + c2)) , abs(r2 - (r1 + c1 - c2) ) ) ) );
end.

const n=8;
      dong:array[1..8] of longint=(-1,-1,0,1,1,1,0,-1);
      cot:array[1..8] of longint=(0,1,1,1,0,-1,-1,-1);

type banghi=record
        x,y:longint;
     end;

var free:array[1..n,1..n] of boolean;

    f:array[1..n,1..n] of longint;

    queue:array[1..n*n] of banghi;

    r1,c1,r2,c2,first,last:longint;

procedure doc;
begin

    readln(r1,c1,r2,c2);
end;

procedure push(u,v:longint);
begin
    inc(last);
    queue[last].x:=u;
    queue[last].y:=v;

    free[u,v]:=false;
end;

procedure check(newu,newv,u,v:longint);
begin
    if free[newu,newv] then
        begin
            f[newu,newv]:=f[u,v]+1;
            push(newu,newv);
        end;
end;

function inside(u,v:longint):boolean;
begin

    if not((1<=u) and (u<=n) and (1<=v) and (v<=n)) then exit(false);
    exit(free[u,v]);
end;

procedure bfs(loai:longint);
var u,v,newu,newv,i:longint;
begin

    fillchar(free,sizeof(free),true);
    fillchar(f,sizeof(f),0);

    first:=1;
    last:=0;

    push(r1,c1);

    while first<=last do
        begin

            u:=queue[first].x;
            v:=queue[first].y;
            inc(first);

            if loai=1 then
                begin
                    newu:=u;
                    newv:=v;

                    while (newu+1<=n) do
                        begin
                            inc(newu);
                            check(newu,newv,u,v);
                        end;

                    newu:=u;
                    while (newu-1>=1) do
                        begin
                            dec(newu);
                            check(newu,newv,u,v);
                        end;

                    newu:=u;
                    while (newv+1<=n) do
                        begin
                            inc(newv);
                            check(newu,newv,u,v);
                        end;

                    newv:=v;
                    while (newv-1>=1) do
                        begin
                            dec(newv);
                            check(newu,newv,u,v);
                        end;
                end;

            if loai=2 then
                begin
                    newu:=u;
                    newv:=v;

                    while (newu+1<=n) and (newv+1<=n) do
                        begin
                            inc(newu);
                            inc(newv);
                            check(newu,newv,u,v);
                        end;

                    newu:=u;
                    newv:=v;

                    while (newu-1>=1) and (newv-1>=1) do
                        begin
                            dec(newu);
                            dec(newv);
                            check(newu,newv,u,v);
                        end;

                    newu:=u;
                    newv:=v;

                    while (newu-1>=1) and (newv+1<=n) do
                        begin
                            dec(newu);
                            inc(newv);
                            check(newu,newv,u,v);
                        end;

                    newu:=u;
                    newv:=v;

                    while (newu+1<=n) and (newv-1>=1) do
                        begin
                            inc(newu);
                            dec(newv);
                            check(newu,newv,u,v);
                        end;
                end;

            if loai=3 then
                begin
                    for i:=1 to 8 do
                        begin
                            newu:=u+dong[i];
                            newv:=v+cot[i];

                            if inside(newu,newv) then check(newu,newv,u,v);
                        end;
                end;
        end;

    write(f[r2,c2],' ');
end;

procedure xuly;
begin

    bfs(1);
    bfs(2);
    bfs(3);
end;

begin

    //assign(input,'nhap.inp'); reset(input);

    doc;
    xuly;
end.

uses math;
const
  tinp='';
  tout='';

var
  fi,fo:text;
  r1,c1,r2,c2:longint;

procedure input;
begin
  assign(fi,tinp);reset(fi);
  read(fi,r1,c1,r2,c2);
  close(fi);
end;

procedure output;
begin
  assign(fo,tout);rewrite(fo);
  if (r1=r2) or (c1=c2) then writeln(fo,1)
  else writeln(fo,2);
  if ((r1+c1) mod 2 <> (r2+c2) mod 2) then writeln(fo,0) else
  if (r1-c1=r2-c2) or (r1+c1=r2+c2) then writeln(fo,1) else
  writeln(fo,2);
  write(fo,max(abs(r1-r2),abs(c1-c2)));
  close(fo);
end;

BEGIN
  input;
  output;
END.

var c,kp,kf,f,p,r1,c1,r2,c2,l,s,k:integer;
s1,s2 :string;
begin
read(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then l:=1 else l:=2;
if ((odd(r1)=false) and (odd(c1)=false)) or ((odd(r1)=true) and (odd(c1)=true)) then s1:='Black' else s1:='White';
if ((odd(r2)=false) and (odd(c2)=false)) or ((odd(r2)=true) and (odd(c2)=true)) then s2:='Black' else s2:='White';
if (s1<>s2)then s:=0 else
begin
for p:=-8 to 8 do begin
if ((r1+p=r2) and (c1+p=c2)) or ((r1-p=r2) and (c1+p=c2)) then s:=1;
end;
if (s=0)then s:=2;
end;
for p:=-8 to 8 do begin
for f:=-8 to 8 do begin
if (r1+p=r2) and (c1+f=c2) then begin
kp:=abs(p);
kf:=abs(f);
end;
end;
end;
if (kp<kf) then begin
c:=kp;
kp:=kf;
kf:=c;
end;
k:=kp;
write(l,' ',s,' ',k);
end.

var
s1,s2,i,r1,r2,c1,c2:integer;
begin

readln(r1,c1,r2,c2);
if (r1 = r2) or (c2=c1) then write(1,' ')
     else write(2,' ');
if (r1 + c1 = r2+c2) or (r1-c1 = r2-c2) then
  write(1,' ')
  else
  if ((r1 + c1) mod 2) = ((r2+c2) mod 2 ) then write(2,' ')
    else write(0,' ');
s1:=r2-r1;
s2:=c2-c1;
if abs(s1) >= abs(s2) then write(abs(s1),' ')
  else write(abs(s2),' ');
end.

Uses math;
Type
        mat=array [1..100000] of longint;
Var     a:mat;
        n,r1,c1,r2,c2:longint;
        fi,fo:text;

Procedure Doc;
        Begin
                Read(fi,r1,c1,r2,c2);
        end;

Procedure Doicho(Var x,y:longint);
        Var tg:longint;
        Begin
                tg:=x;
                x:=y;
                y:=tg;
        end;

Procedure Sort(l,r:longint);
        Var i,j,key:longint;
        Begin
                i:=l;
                j:=r;
                key:=a[l+random(r-l+1)];
                Repeat
                        While a[i]<key do inc(i);
                        While a[j]>key do dec(j);
                          If i<=j then
                           Begin
                                Doicho(a[i],a[j]);
                                inc(i);
                                dec(j);
                           end;
                Until i>j;
                If i<r then Sort(i,r);
                If l<j then Sort(l,j);
        end;

Procedure Lam;
        Begin
                If (r1=r2) and (c1=c2) then
                 Begin
                        Write(fo,0,' ',0,' ',0);
                        exit;
                 end;
                If (r1=r2) or (c1=c2) then Write(fo,1,' ')
                else Write(fo,2,' ');
                If (r1+c1) mod 2<>(r2+c2) mod 2 then Write(fo,0,' ')
                else
                 Begin
                        If (r1+c1)=(r2+c2) then Write(fo,1,' ')
                        else If (r1-c1)=(r2-c2) then Write(fo,1,' ')
                        else Write(fo,2,' ');
                 end;
                Write(fo,Max(abs(r1-r2),abs(c1-c2)));

             {   If abs(gx+gy) mod 2<>abs(sx+sy) mod 2 then
                 Begin
                        dec(gy);
                        nho:=1;
                 end;
                Write(fo,nho+Max(abs(sx-gx),abs(sy-gy))); }
        end;

Procedure Inkq;
        Begin
        end;

        Begin
                Assign(fi,'');Reset(fi);
                Assign(fo,'');Rewrite(fo);
                        Doc;
                        Lam;
                        Inkq;
                Close(fo);Close(fi);
        end.

var r1, c1, r2, c2: byte;
begin
        readln(r1, c1, r2, c2);
        if (r1 = r2) and (c1 = c2) then
                write(0, ' ', 0, ' ', 0)
        else if (r1 = r2) xor (c1 = c2) then
        begin
                write(1, ' ');
                if odd(abs(c1 - c2) + (r1 - r2)) then
                        write(0)
                else
                        write(2);
                write(' ', abs((c1 - c2) + (r1 - r2)));
        end
        else
        begin
                write(2, ' ');
                if abs(r1 - r2) = abs(c1 - c2) then
                        write(1)
                else if abs(r1 - r2) mod 2 = abs(c1 - c2) mod 2 then
                        write(2)
                else
                        write(0);
                if abs(r1 - r2) > abs(c1 - c2) then
                        write(' ', abs(r1 - r2))
                else
                        write(' ', abs(c1 - c2));
        end;
end.

var
r1,c1,r2,c2: byte;
lad,slon,korol:byte;

begin
read (r1,c1,r2,c2);

if (abs(r1-r2)>0) and (abs(c1-c2)>0) then lad:=2
  else if (abs(r1-r2)>0) or (abs(c1-c2)>0) then lad:=1
  else lad:=0;
write(lad,' ');

if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
  if (abs (r1-r2) = abs(c1-c2)) then slon:=1
    else slon:=2
else
  slon:=0;
write(slon,' ');

if (r1-r2=0) then korol:=abs(c1-c2)
else
  if (c1-c2=0) then korol:=abs(r1-r2)
  else
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(r1-r2)
      else korol:=abs(c1-c2);
write(korol,' ');

end.

var
r1,c1,r2,c2,l,e,k,max:integer;
begin
readln(r1,c1,r2,c2);max:=abs(r1-r2);
if (c1=c2) or (r1=r2) then
l:=1
else l:=2;
if abs(r1-r2)=abs(c1-c2) then
e:=1
else if ((r1+c1) mod 2)<>((r2+c2) mod 2) then
e:=0
else e:=2;
if abs(c1-c2)>max then
max:=abs(c1-c2);
k:=max;
writeln(l,' ',e,' ',k);
end.

uses math;
var r1, c1, r2, c2, l, s, k : longint;
begin
	Readln(r1,c1,r2,c2);
	if (r1=r2) or (c1=c2) then l:=1
	else l:=2;
	if (r1+c1+r2+c2) mod 2 = 0 then begin
		if abs(r1-r2) = abs(c1-c2) then s:=1
		else s:=2;
	end else s:=0;
	k:=max(abs(c1-c2),abs(r1-r2));
	Writeln(l,' ',s,' ',k);
end.

uses math;
Var  x1,x2,y1,y2:longint;
    lechcot,lechhang:longint;

Procedure doc;
begin
    Readln(x1,y1,x2,y2);
end;

procedure xuly;
begin
    If (x1=x2) and (y1=y2) then
        begin
            Writeln(0,' ',0,' ',0);
            halt;
        end;
    If (x1=x2) or (y1=y2) then
            Write(1,' ')
    else
        Write(2,' ');
    If ((x1+y1) mod 2)<>((x2+y2) mod 2) then
        Write(0,' ')
    else
    If (x1+y1=x2+y2) or (x1-x2=y1-y2) then
        Write(1,' ')
    else
        Write(2,' ');
    lechcot:=abs(x1-x2);
    lechhang:=abs(y1-y2);
    Write(max(lechcot,lechhang));
end;

begin
    doc;
    xuly;
end.

Program Ladya_Slon_Korol;
var x1,x2,y1,y2,resladya,reskorol,resslon,i,j:integer;
    a:array [1..8,1..8] of integer;
function diagac(x,y:integer):integer;
begin
 diagac:=x-y;
end;
procedure zapoln(x,y,n:integer);
begin
 a[x,y]:=n;
 inc(n);
 if n<=12 then
 begin
  if (x+1 in [1..8]) and (y+1 in [1..8]) then
  begin
   if a[x+1,y+1]>n then zapoln(x+1,y+1,n);
  end;
  if (x+1 in [1..8]) then
  begin
   if a[x+1,y]>n then zapoln(x+1,y,n);
  end;
  if (x+1 in [1..8]) and (y-1 in [1..8]) then
  begin
   if a[x+1,y-1]>n then zapoln(x+1,y-1,n);
  end;
  if (y+1 in [1..8]) then
  begin
   if a[x,y+1]>n then zapoln(x,y+1,n);
  end;
  if (y-1 in [1..8]) then
  begin
   if a[x,y-1]>n then zapoln(x,y-1,n);
  end;
  if (x-1 in [1..8]) and (y+1 in [1..8]) then
  begin
   if a[x-1,y+1]>n then zapoln(x-1,y+1,n);
  end;
  if (x-1 in [1..8]) then
  begin
   if a[x-1,y]>n then zapoln(x-1,y,n);
  end;
  if (x-1 in [1..8]) and (y-1 in [1..8]) then
  begin
   if a[x-1,y-1]>n then zapoln(x-1,y-1,n);
  end;
 end;
end;
begin
 readln(x1,y1,x2,y2);
 resladya:=0;
 if x1<>x2 then inc(resladya);

 if y1<>y2 then inc(resladya);
 for i:=1 to 8 do
 begin
  for j:=1 to 8 do
  begin
   a[j,i]:=16;
  end;
 end;
 zapoln(x1,y1,0);

 reskorol:=a[x2,y2];

 resslon:=0;
 if  odd(x1+y1)=odd(x2+y2) then
 begin
  for i:=1 to 8 do
  begin
   for j:=1 to 8 do
   begin
    a[j,i]:=2;
   end;
  end;
  i:=x1;
  j:=y1;
  while (i<=8) and (j<=8) do
  begin
   a[i,j]:=1;
   inc(i);
   inc(j);
  end;
  i:=x1;
  j:=y1;
  while (i<=8) and (j>=1) do
  begin
   a[i,j]:=1;
   inc(i);
   dec(j);
  end;
  i:=x1;
  j:=y1;
  while (i>=1) and (j<=8) do
  begin
   a[i,j]:=1;
   dec(i);
   inc(j);
  end;
  i:=x1;
  j:=y1;
  while (i>=1) and (j>=1) do
  begin
   a[i,j]:=1;
   dec(i);
   dec(j);
  end;
  resslon:=a[x2,y2];
 end;
 writeln(resladya,' ',resslon,' ',reskorol);
end.

uses math;
var i,j,x1,x2,y1,y2,n,m,k,d,f,e,q,w:longint;
    //a,b,c:array[1..8,1..8] of longint;
begin
    read(x1,y1,x2,y2);
    //e:=min(abs(x1-x2),abs(y1-y2));
    e:=max(abs(x1-x2),abs(y1-y2));
    if (x1<>x2) then inc(q);
    if y1<>y2 then inc(q);
    if (x1+y1)mod 2 = (x2+y2)mod 2 then
    begin
        if abs(x1-x2)<>abs(y1-y2) then
            inc(w);
        inc(w);
    end;
    write(q,' ',w,' ',e);
end.

uses    math;
var     r1,r2,c1,c2: integer;
{}
begin
        readln(r1,c1,r2,c2);
        if (r1=r2)or(c1=c2) then write(1) else write(2);
        write(' ');
        if (r1+c1)mod 2 <>(r2+c2)mod 2 then write(0) else
          if (r1+c1=r2+c2)or(r1-c1=r2-c2) then write(1) else write(2);
        write(' ');
        write(max(abs(r1-r2),abs(c1-c2)));
end.

var
   m:array [1..111,1..111] of integer;
   r1,r2,c1,c2,r,b,a,i,j,x,y,t,k,ans1,ans:integer;
begin
     read(r1,c1,r2,c2);

     if (r1=r2) or (c1=c2) then r:=1 else r:=2;

     if abs(r1-r2)=abs(c1-c2) then b:=1 else
     if (abs(r1-c1) mod 2=0) and (abs(r2-c2) mod 2=1) or
        (abs(r1-c1) mod 2=1) and (abs(r2-c2) mod 2=0) then b:=0 else b:=2;

     if (r1=r2) or (abs(r1-r2)=abs(c1-c2)) then k:=abs(c2-c1) else
     if c1=c2 then k:=abs(r1-r2) else
     begin
          k:=0; x:=r1-r2; y:=c1-c2;
          if x<0 then ans:=-1 else ans:=1;
          if y<0 then ans1:=-1 else ans1:=1;
          repeat
                r1:=r1-ans;
                c1:=c1-ans1;
                k:=a+1;
          until (r1=r2) or (c1=c2);
          if r1=r2 then k:=k+abs(c1-c2);
          if c1=c2 then k:=k+abs(r1-r2);
     end;

     write(r,' ',b,' ',k);
end.

var
   m:array [1..8,1..8] of integer;
   r1,r2,c1,c2,r,b,k,t,i,j,d,c,a:integer;
begin
     read(r1,c1,r2,c2);

     if (r1=r2) or (c1=c2) then r:=1 else r:=2;

     if (r1=r2) or (c1=c2) then b:=0 else
     if (abs(r1-r2)=abs(c1-c2)) then b:=1 else begin b:=maxint;
     repeat
           t:=t+1;
           for i:=1 to 8 do
           for j:=1 to 8 do m[i,j]:=0;
           repeat
                 i:=random(8)+1;
                 j:=random(8)+1;
                 if (abs(r1-i)=abs(c1-j)) and (m[i,j]=0) then
                 begin
                      a:=a+1;
                      m[i,j]:=a;
                 end;
           until (r1=i) and (c1=j);
           if b>a then b:=a;
      until t=100;
      end;

      if r1=r2 then k:=abs(c1-c2) else
      if c1=c2 then k:=abs(r1-r2) else
      if (abs(r1-r2)=abs(c1-c2)) then k:=abs(r1-r2) else
      begin
           c:=r1-r2;
           d:=r1+c;
           k:=abs(c)+abs(c2-d);
      end;

      write(r,' ',b,' ',k);
end.

Program sad;
var x1,x2,y1,y2:integer;
begin
read(x1,y1,x2,y2);
if (x1=x2) or (y1=y2) then write(1,' ') else
write(2,' ');
if ((x1+y1) mod 2)<>((x2+y2) mod 2) then write(0,' ') else
begin
if (x1+y1)=(x2+y2) then write(1,' ') else
write(2,' ');
end;
x1:=abs(x1-x2);
y1:=abs(y1-y2);
write( (((x1+y1)-abs(x1-y1)) div 2 )+ abs(x1-y1) );
end.

program chess;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
   r1,c1,r2,c2,ld,sl,k:integer;
begin
   readln(r1,c1,r2,c2);
   if ((r1=r2) or (c1=c2)) then ld:=1
   else ld:=2;
   if ((odd(r1+c1)<>odd(r2+c2))) then sl:=0
   else if (abs(r1-r2)=abs(c1-c2)) then sl:=1
   else sl:=2;
   if (r1=r2) then k:=abs(c1-c2)
   else if (c1=c2) then k:=abs(r1-r2)
   else if (abs(r1-r2)=abs(c1-c2)) then k:=abs(c1-c2)
   else k:=abs(abs(r1-r2)-abs(c1-c2));
   writeln(ld,' ',sl,' ',k);
   readln;
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
{procedure rec(r,c,t:integer; d1:real);
var
  d:real;
begin
  if (c=c2) and (r=r2) then
    if t<k3 then
      k3:=t;
  d:=sqrt(sqr(r2-r)+sqr(c2-c));
  if d<d1 then
  if (8>r) and (8>c) then
    begin
      rec(r+1,c,t+1,d);
      rec(r-1,c,t+1,d);
      rec(r,c+1,t+1,d);
      rec(r,c-1,t+1,d);
      rec(r+1,c+1,t+1,d);
      rec(r+1,c-1,t+1,d);
      rec(r-1,c+1,t+1,d);
      rec(r-1,c-1,t+1,d);
    end;
end;}
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;

  if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if (r1=r2) and (c1<>c2) then
    if abs(c2-c1)mod 2 = 0 then k2:=2;
   if (c1=c2) and (r1<>r2) then
    if abs(r2-r1)mod 2 = 0 then k2:=2;
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1;
  //k3:=65;
  //rec(c1,r1,0,sqrt(sqr(r2-r1)+sqr(c2-c1)));
  while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
{procedure rec(r,c,t:integer; d1:real);
var
  d:real;
begin
  if (c=c2) and (r=r2) then
    if t<k3 then
      k3:=t;
  d:=sqrt(sqr(r2-r)+sqr(c2-c));
  if d<d1 then
  if (8>r) and (8>c) then
    begin
      rec(r+1,c,t+1,d);
      rec(r-1,c,t+1,d);
      rec(r,c+1,t+1,d);
      rec(r,c-1,t+1,d);
      rec(r+1,c+1,t+1,d);
      rec(r+1,c-1,t+1,d);
      rec(r-1,c+1,t+1,d);
      rec(r-1,c-1,t+1,d);
    end;
end;}
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;

  if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  //k3:=65;
  //rec(c1,r1,0,sqrt(sqr(r2-r1)+sqr(c2-c1)));
  while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;

  if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if (r1=r2) and (c1<>c2) then
    if abs(c2-c1)mod 2 = 0 then k2:=2;
   if (c1=c2) and (r1<>r2) then
    if abs(r2-r1)mod 2 = 0 then k2:=2;
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1;
  if (abs(r2-r1+1) mod 2 = 1) and (abs(c2-c1+1) mod 2 = 1) then k2:=2;
  {while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);}
  if abs(r2-r1)<abs(c2-c1) then
    k3:=abs(c2-c1) else k3:=abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
{procedure rec(r,c,t:integer; d1:real);
var
  d:real;
begin
  if (c=c2) and (r=r2) then
    if t<k3 then
      k3:=t;
  d:=sqrt(sqr(r2-r)+sqr(c2-c));
  if d<d1 then
  if (8>r) and (8>c) then
    begin
      rec(r+1,c,t+1,d);
      rec(r-1,c,t+1,d);
      rec(r,c+1,t+1,d);
      rec(r,c-1,t+1,d);
      rec(r+1,c+1,t+1,d);
      rec(r+1,c-1,t+1,d);
      rec(r-1,c+1,t+1,d);
      rec(r-1,c-1,t+1,d);
    end;
end;}
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;

  if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if (r1=r2) and (c1<>c2) then
    if abs(c2-c1)mod 2 = 0 then k2:=2 else k2:=0;
   if (c1=c2) and (r1<>r2) then
    if abs(r2-r1)mod 2 = 0 then k2:=2 else k2:=0;
  //k3:=65;
  //rec(c1,r1,0,sqrt(sqr(r2-r1)+sqr(c2-c1)));
  while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var
  c1,c2,r1,r2,k1,k2,k3:integer;
begin
  readln(r1,c1,r2,c2);

  if (r1=r2) or (c1=c2) then
    k1:=1 else k1:=2;

  if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
    k2:=0 else
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1 else k2:=2;
  if (r1=r2) and (c1<>c2) then
    if abs(c2-c1)mod 2 = 0 then k2:=2;
   if (c1=c2) and (r1<>r2) then
    if abs(r2-r1)mod 2 = 0 then k2:=2;
  if abs(r2-r1)=abs(c2-c1) then
    k2:=1;
  {while true do
  begin
    if (c1<9) and (r1<9) then
    if (abs(r2-r1)mod 2 = 0) or (abs(c2-c1)mod 2 = 0) then
      begin
        if (c2>c1) or (r2>r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1+1 else c1:=c1+1;
        if (c2<c1) or (r2<r1) then
        if abs(r2-r1)>abs(c2-c1) then
          r1:=r1-1 else c1:=c1-1;
        k3:=k3+1;
      end else break;
    if (c1=c2) and (r1=r2) then break;
  end;
  k3:=k3+abs(r2-r1);}
  if abs(r2-r1)<abs(c2-c1) then
    k3:=abs(c2-c1) else k3:=abs(r2-r1);
  writeln(k1,' ',k2,' ',k3);
end.

var
 r1,c1,r2,c2,i,j,a,b,c,f,l:integer;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2) or (c1=c2)then a:=1 else a:=2;
 l:=0;
 if ((c1 mod 2)=(r1 mod 2)) and ((c2 mod 2)<>(r2 mod 2)) then begin l:=2; b:=0; end
 else if ((c1 mod 2)<>(r1 mod 2)) and ((c2 mod 2)=(r2 mod 2)) then begin b:=0; l:=2; end
 else begin
 i:=r1; j:=c1; f:=r1;
 while j>=1 do begin
 if (i=r2) and (j=c2) then begin l:=1; b:=1; end;
 if (f=r2) and (j=c2) then begin l:=1; b:=1; end;
 if f<8 then f:=f+1;
 if i>1 then i:=i-1;
 j:=j-1;
 end;
 i:=r1; j:=c1; f:=r1;
 while j<=8 do begin
 if (i=r2) and (j=c2) then begin l:=1; b:=1; end;
 if (f=r2) and (j=c2) then begin l:=1; b:=1; end;
 if f<8 then f:=f+1;
 if i>1 then i:=i-1;
 j:=j+1;
 end;
 end;
 if l=0 then b:=2;
 i:=abs(r2-r1);
 j:=abs(c2-c1);
 if i<j then c:=abs(c2-c1);
 if j<i then c:=abs(r2-r1);
 if i=j then c:=i;
 writeln(a,' ',b,' ',c);
end.

var
 r1,c1,r2,c2,i,j,a,b,c,f,l:integer;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2) or (c1=c2)then a:=1 else a:=2;
 l:=0;
 if ((c1 mod 2)=(r1 mod 2)) and ((c2 mod 2)<>(r2 mod 2)) then begin l:=2; b:=0; end
 else if ((c1 mod 2)<>(r1 mod 2)) and ((c2 mod 2)=(r2 mod 2)) then begin b:=0; l:=2; end
 else begin
 i:=r1; j:=c1; f:=r1;
 while j>=1 do begin
 if (i=r2) and (j=c2) then begin l:=1; b:=1; end;
 if (j=r2) and (j=c2) then begin l:=1; b:=1; end;
 if f<8 then f:=f+1;
 if i>1 then i:=i-1;
 j:=j-1;
 end;
 i:=r1; j:=c1; f:=r1;
 while j<=8 do begin
 if (i=r2) and (j=c2) then begin l:=1; b:=1; end;
 if (j=r2) and (j=c2) then begin l:=1; b:=1; end;
 if f<8 then f:=f+1;
 if i>1 then i:=i-1;
 j:=j+1;
 end;
 end;
 if l=0 then b:=2;
 i:=abs(r2-r1);
 j:=abs(c2-c1);
 if i<j then c:=abs(c2-c1);
 if j<i then c:=abs(r2-r1);
 if i=j then c:=i;
 writeln(a,' ',b,' ',c);
end.

var
  X1, X2, Y1, Y2, A1, A2, A3: integer;

begin
  read(X1, Y1, X2, Y2);
  if ((X1 mod 2 = X2 mod 2) and (Y1 mod 2 = Y2 mod 2)) or
    ((X1 mod 2 <> X2 mod 2) and (Y1 mod 2 <> Y2 mod 2)) then
  begin
    if (X1 = X2) and (Y1 = Y2) then
    begin
      A2 := 0;
    end
    else if (abs(X1 - X2) = abs(Y1 - Y2)) then
    begin
      A2 := 1;
    end
    else
    begin
      A2 := 2;
    end;
  end
  else
  begin
    A2 := 0;
  end;
  if (X1 = X2) and (Y1 = Y2) then
  begin
    A1 := 0;
  end
  else if (X1 = X2) or (Y1 = Y2) then
  begin
    A1 := 1;
  end
  else
  begin
    A1 := 2;
  end;
  if (X1 = X2) and (Y1 = Y2) then
  begin
    A3 := 0;
  end
  else if (X1 = X2) then
  begin
    A3 := abs(Y1 - Y2);
  end
  else if (Y1 = Y2) then
  begin
    A3 := abs(X1 - X2);
  end
  else
  begin
    if (abs(X1 - X2) > abs(Y1 - Y2)) then
    begin
      A3 := abs(X1 - X2) - abs(Y1 - Y2) + abs(Y1 - Y2);
    end
    else
    begin
      A3 := abs(Y1 - Y2) - abs(X1 - X2) + abs(X1 - X2);
    end;
  end;
  writeln(A1, A2, A3);

end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n,m,k,j,i,h,x,y,y1,x1,k1:integer;
function min(x,y:Integer):integer;
begin
  if (x<y) then
    min:=x
  else
    min:=y;
end;
begin
  readln(x,y,x1,y1);
  if (x=x1) and (y=y1) then
    write(0,' ')
  else if (x=x1) or (y=y1) then
    write(1,' ')
  else
    write(2,' ');
  if (x=x1) and (y=y1) then
    write(0)
  else if (Abs(x-x1)=abs(y-y1)) then
    write(1)
  else
  begin
    if (x mod 2=1) then
    begin
      if (y mod 2=1) then
        k:=1
      else
        k:=2;
    end;
    if (x1 mod 2=1) then
    begin
      if (y1 mod 2=1) then
        k1:=1
      else
        k1:=2;
    end;
    if (k=k1) then
      write(2)
    else
      write(0);
  end;
  write(' ');
  write(abs(x-x1)+abs(y-y1)-min(abs(x-x1),abs(y-y1)));
  readln;
  readln;
end.

program Project1;

{$APPTYPE CONSOLE}
var
x1, x2, y1, y2 : LongInt;
function max(a, b : LongInt) : LongInt;
begin
  if a > b then
    max := a
  else
    max := b;
end;
begin
  Readln(x1, y1, x2, y2);
  if (x1=x2) and (y1=y2) then
    Write(0, ' ')
  else
    if (x1=x2) or (y1=y2) then
      Write(1, ' ')
    else
      Write(2, ' ');

  if ((x1=x2) and (y1=y2)) or ((x1 + y1) mod 2 <> (x2 + y2) mod 2) then
    Write(0, ' ')
  else
  begin
    if (x1 - y1 = x2 - y2) or (x1 + y1 = x2 + y2) then
      Write(1, ' ');
  end;

  Write(max(abs(x1 - x2), abs(y1 - y2)));
end.

var a,b,c,d:longint;
function max(a,b:longint):Longint;
begin
  max:=a;
  if b>a then max:=b;
end;
begin
  readln (a,b,c,d);
  //
  if (a=c) or (b=d) then write ('1 ') else write ('2 ');
  //
  if ((a+b) mod 2<>(c+d) mod 2) then write ('0 ') else
   begin
     if (abs(a+b)=abs(c+d)) or (abs(a-b)=abs(c-d)) then write ('1 ') else write ('2 ');
   end;
  //
  write (max(c-a,d-b));
end.

var a,b,c,d:longint;
function max(a,b:longint):Longint;
begin
  max:=a;
  if b>a then max:=b;
end;
begin
  readln (a,b,c,d);
  //
  if (a=c) or (b=d) then write ('1 ') else write ('2 ');
  //
  if ((a+b) mod 2<>(c+d) mod 2) then write ('0 ') else
   begin
     if (abs(a+b)=abs(c+d)) or (abs(a-b)=abs(c-d)) then write ('1 ') else write ('2 ');
   end;
  //
  write (max(abs(c-a),abs(d-b)));
end.

program sdjkj;
var x1, y1, x2, y2: integer;
    sl, lad, king: integer;
function isBlack(x: integer; y: integer):boolean;
begin
  if ((x mod 2 = 0) and (y mod 2 <> 0))
     or
     ((x mod 2 <> 0) and (y mod 2 = 0))
  then isBlack := true else isBlack := false;
end;

begin
  read(x1, y1, x2, y2);
  x1 := x1 - 1;
  x2 := x2 - 1;
  y1 := y1 - 1;
  y2 := y2 - 1;

  if( isBlack(x1, y1) <> isBlack(x2, y2) ) then sl := 0 else
  begin
    if ((x1 - y1) = (x2 - y2)) or ((x1 + y1) = (x2 + y2)) then sl := 1 else sl := 2;
  end;
  //writeln(sl);

  if (x1 = x2) or (y1 = y2) then lad := 1 else lad := 2;
  if (x1 = x2) or (y1 = y2) then king := abs(x1-x2) + abs(y2-y2) else
                                 king := (abs(x2-x1) + abs(y2-y1)) div 2 + (abs(x2-x1) + abs(y2-y1)) mod 2;

  write(lad, ' ', sl, ' ', king);
end.

program sdjkj;
var x1, y1, x2, y2: integer;
    sl, lad, king: integer;
function isBlack(x: integer; y: integer):boolean;
begin
  if ((x mod 2 = 0) and (y mod 2 <> 0))
     or
     ((x mod 2 <> 0) and (y mod 2 = 0))
  then isBlack := true else isBlack := false;
end;

begin
  read(x1, y1, x2, y2);
  x1 := x1 - 1;
  x2 := x2 - 1;
  y1 := y1 - 1;
  y2 := y2 - 1;

  if( isBlack(x1, y1) <> isBlack(x2, y2) ) then sl := 0 else
  begin
    if ((x1 - y1) = (x2 - y2)) or ((x1 + y1) = (x2 + y2)) then sl := 1 else sl := 2;
  end;
  //writeln(sl);

  if (x1 = x2) or (y1 = y2) then lad := 1 else lad := 2;
  if (x1 = x2) or (y1 = y2) then king := abs(x2-x1) + abs(y2-y1) else
                                 king := (abs(x2-x1) + abs(y2-y1)) div 2 + (abs(x2-x1) + abs(y2-y1)) mod 2;

  write(lad, ' ', sl, ' ', king);
end.

program sdjkj;
var x1, y1, x2, y2: integer;
    sl, lad, king: integer;
function isBlack(x: integer; y: integer):boolean;
begin
  if ((x mod 2 = 0) and (y mod 2 <> 0))
     or
     ((x mod 2 <> 0) and (y mod 2 = 0))
  then isBlack := true else isBlack := false;
end;

begin
  read(x1, y1, x2, y2);
  x1 := x1 - 1;
  x2 := x2 - 1;
  y1 := y1 - 1;
  y2 := y2 - 1;

  if( isBlack(x1, y1) <> isBlack(x2, y2) ) then sl := 0 else
  begin
    if ((x1 - y1) = (x2 - y2)) or ((x1 + y1) = (x2 + y2)) then sl := 1 else sl := 2;
  end;
  //writeln(sl);

  if (x1 = x2) or (y1 = y2) then lad := 1 else lad := 2;

  king := (abs(x2-x1) + abs(y2-y1)) div 2 + (abs(x2-x1) + abs(y2-y1)) mod 2;
  write(lad, ' ', sl, ' ', king);
end.

program zzz;
 var x1,x2,y1,y2:longint;
 function max(x,y:longint):longint;
 begin
  if x>y then max:=x else max:=y;
 end;

 begin

  read(x1,y1,x2,y2);
  if (x1=x2) or(y2=y1) then write(1,' ') else write(2,' ');

  if abs(x1-x2)=abs(y1-y2) then write(1,' ') else
  if (abs(x1-x2) mod 2=0) and (abs(y1-y2) mod 2=0) then write(2,' ')
  else if (abs(x1-x2) mod 2=0) or (abs(y1-y2) mod 2=0) then write(0,' ');

  write(max(abs(x1-x2),abs(y1-y2)));

 end.

var
  x,y,x1,x2,y1,y2,a1,a2,a3,q : longint;

begin
  readln(x1,y1,x2,y2);
  if (x1 <> x2) then inc(a1);
  if (y1 <> y2) then inc(a1);
  if (abs(x1-x2) = abs(y1-y2)) then a2:=1 else begin
    x:=x1; y:=y1;
    while (x <= 8) and (y <= 8) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      inc(x);
      inc(y);
    end;
    x:=x1; y:=y1;
    while (x <= 8) and (y >= 1) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      inc(x);
      dec(y);
    end;
    x:=x1; y:=y1;
    while (x >= 1) and (y <= 8) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      dec(x);
      inc(y);
    end;
    x:=x1; y:=y1;
    while (x >= 1) and (y >= 1) do begin
      if abs(x-x2) = abs(y-y2) then a2:=2;
      dec(x);
      dec(y);
    end;
  end;
    a3:=maxlongint;
    x:=x1; y:=y1; q:=0;
    while (x <= 8) and (y <= 8) do begin
      if abs(x-x2) + abs(y-y2)+q < a3 then a3:=abs(x-x2) + abs(y-y2)+q;
      inc(x);
      inc(y);
      inc(q);
    end;
    x:=x1; y:=y1; q:=0;
    while (x <= 8) and (y >= 1) do begin
      if abs(x-x2) + abs(y-y2) < a3 then a3:=abs(x-x2) + abs(y-y2)+q;
      inc(x);
      dec(y);
      inc(q);
    end;
    x:=x1; y:=y1; q:=0;
    while (x >= 1) and (y <= 8) do begin
      if abs(x-x2) + abs(y-y2) < a3 then a3:=abs(x-x2) + abs(y-y2)+q;
      dec(x);
      inc(y);
      inc(q);
    end;
    x:=x1; y:=y1; q:=0;
    while (x >= 1) and (y >= 1) do begin
      if abs(x-x2) + abs(y-y2) < a3 then a3:=abs(x-x2) + abs(y-y2)+q;
      dec(x);
      dec(y);
      inc(q);
    end;
    writeln(a1,' ',a2,' ',a3);
end.

uses math;
var
  sx,sy,fx,fy,k,l,s,delta,i,j,nx,ny : longint;
  color : array [0..200,0..200] of longint;
  found : boolean;
  procedure check(x,y : longint);
  begin
    if (x=fx) and (y=fy) then found:=true;
  end;
begin
  readln(sx,sy,fx,fy);
  for i:=1 to 8 do
    for j:=1 to 8 do
      color[i][j]:=(i+j) mod 2;
  if color[sx][sy]<>color[fx][fy] then s:=0 else
  begin
    found:=false;
    for delta:=1 to 100 do
    begin
      nx:=sx+delta; ny:=sy+delta;
      check(nx,ny);
      nx:=sx-delta; ny:=sy+delta;
      check(nx,ny);
      nx:=sx+delta; ny:=sy-delta;
      check(nx,ny);
      nx:=nx-delta; ny:=sy-delta;
      check(nx,ny);
    end;
    if found then s:=1 else s:=2;
  end;
  k:=max(abs(sx-fx),abs(sy-fy));
  if (sx=fx) or (sy=fy) then l:=1 else l:=2;
  writeln(l,' ',s,' ',k);
end.

var
a,b,c,d,sum1,sum2,sum3:longint;
begin
readln(a,b,c,d);
if (a=c) and (b=d) then
sum1:=0;
if (a<>c) and (b<>d) then
sum1:=2;
if (a<>c) and (b=d) then
sum1:=1;
if (a=c) and (b<>d) then
sum1:=1;
if ((a=c) and (b=d)) or (((a+b) mod 2)<>((c+d) mod 2)) then
sum2:=0
else
if (a+b)=(c+d) then
sum2:=1
else
sum2:=2;
if abs(a-c)>abs(b-d) then
sum3:=abs(a-c)
else
sum3:=abs(b-d);
writeln(sum1,' ',sum2,' ',sum3);
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2=0 then
    h:=true;

if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;

if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));

if (r1=r2) and (c1=c2) then
  begin
  L:=0; S:=0; K:=0;

  end;

{
writeln((ch(r1,c1)));  }
//writeln((ch(r1,c1)));

writeln(l,' ',S,' ',K,' ');
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-b))=(abs(c-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2<>0 then
    h:=true;
if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;
if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;
ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));

writeln(l,' ',S,' ',K,' ');
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2=0 then
    h:=true;

if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;

if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));

if (r1=r2) and (c1=c2) then
  begin
  L:=0; S:=0; K:=0;

  end;

{
writeln((ch(r1,c1)));
writeln((ch(r2,c2)));       }

writeln(l,' ',S,' ',K,' ');
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2=0 then
    h:=true;

if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;

if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));
{
writeln((ch(r1,c1)));
writeln((ch(r2,c2)));       }

writeln(l,' ',S,' ',K,' ');
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2<>0 then
    h:=true;

if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;

if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));

if (r1=r2) and (c1=c2) then
  begin
  L:=0; S:=0; K:=0;

  end;

{
writeln((ch(r1,c1)));  }
//writeln((ch(r2,c2)));

writeln(l,' ',S,' ',K,' ');
end.

Program A_Chess;
var
   r1,c1,r2,c2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;

if (a mod 2=0) and (b mod 2<>0) then  //black
   h:=true;

if (a mod 2<>0) and (b mod 2=0) then  //white
   h:=true;

if a=b then
  if a mod 2<>0 then
    h:=false;

ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));  //dlia king'a

if (r1=r2) and (c1=c2) then
  begin
  L:=0; S:=0; K:=0;
  end;

writeln(l,' ',S+2,' ',K,' ');
end.

Program A_Plus_B_Problem;
var
   r1,c1,r2,c2,x,y,a,b,x2,y2,t1,t2: integer;
   L,S,K: integer;

function f1(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (a=c) or (b=d) then
  h:=true;
f1:=h;
end;

function f2(a,b,c,d: integer): boolean;
var
  h: boolean;
begin
h:=false;
if (abs(a-c))=(abs(b-d))  then
  h:=true;
f2:=h;
end;

function ch(a,b: integer): boolean;  //true = black
var
  h: boolean;
begin
h:=false;
if a=b then
  if a mod 2<>0 then
    h:=true;
if (a mod 2=0) then
  if b mod 2<>0 then
   h:=true;
if (a mod 2<>0) then
  if b mod 2=0 then
   h:=true;
ch:=h;
end;

function max(a,b: integer): integer;
begin
if a>=b then
  max:=a
else
  max:=b;
end;

//osnovnaja proga
begin
read(r1);read(c1);read(r2);read(c2);
L:=0; S:=0; K:=0;

if f1(r1,c1,r2,c2) then  //ladia gorizont
  L:=1
else
  L:=2;

if (ch(r1,c1)) and (ch(r2,c2)) then  //black elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

if (not(ch(r1,c1))) and (not(ch(r2,c2))) then  //white elehpant
  begin
  if f2(r1,c1,r2,c2) then
    S:=1
  else
    S:=2;
  end;

k:=max(abs(r2-r1),abs(c2-c1));

//writeln(f2(r1,c1,r2,c2));

writeln(l,' ',S,' ',K,' ');
end.

var
a:array[1..8,1..8] of integer;
r1,r2,c1,c2,k,i,j:integer;
begin
readln(r1,c1,r2,c2);
begin
if (r1=r2) or (c1=c2) then
writeln(1)
else writeln(2);
end;
begin
if ((r1+c1)=(r2+c2)) or ((r1-c1)=(r2-c2)) then
writeln(1)
else if (((r1+c1) mod 2=1) and ((r2+c2) mod 2=1)) or (((r1+c1) mod 2=0) and ((r2+c2) mod 2=0)) then
writeln(2)
else writeln(0);
end;
begin
if r1=r2 then
k:=abs(c2-c1)
else if c1=c2 then
k:=abs(r2-r1)
else if (abs(r2-r1))>(abs(c2-c1)) then
k:=abs(r2-r1)
else if (abs(c2-c1))>(abs(r2-r1)) then
k:=abs(c2-c1);
writeln(k);
end;
end.

var
a:array[1..8,1..8] of integer;
r1,r2,c1,c2,k,i,j:integer;
begin
readln(r1,c1,r2,c2);
begin
if (r1=r2) or (c1=c2) then
writeln(1)
else writeln(2);
end;
begin
if ((r1+c1)=(r2+c2)) or ((r1-c1)=(r2-c2)) then
writeln(1)
else if (r1+c1) mod 2=1 then
writeln(2)
else writeln(0);
end;
begin
if r1=r2 then
k:=abs(c2-c1)
else if c1=c2 then
k:=abs(r2-r1)
else k:=abs(c2-c1);
writeln(k);
end;
end.

var
a:array[1..8,1..8] of integer;
r1,r2,c1,c2,k,i,j:integer;
begin
readln(r1,c1,r2,c2);
begin
if (r1=r2) or (c1=c2) then
writeln(1)
else writeln(2);
end;
begin
if ((r1+c1)=(r2+c2)) or ((r1-c1)=(r2-c2)) then
writeln(1)
else if (((r1+c1) mod 2=1) and ((r2+c2) mod 2=1)) or (((r1+c1) mod 2=0) and ((r2+c2) mod 2=0)) then
writeln(2)
else writeln(0);
end;
begin
if r1=r2 then
k:=abs(c2-c1)
else if c1=c2 then
k:=abs(r2-r1)
else k:=abs(c2-c1);
writeln(k);
end;
end.

var
a:array[1..8,1..8] of integer;
r1,r2,c1,c2,k,i,j:integer;
begin
readln(r1,c1,r2,c2);
begin
if (r1=r2) or (c1=c2) then
writeln(1)
else writeln(2);
end;
begin
if ((r1+c1)=(r2+c2)) or ((r1-c1)=(r2-c2)) then
writeln(1)
else if ((r1+c1) mod 2=1) and ((r2+c2) mod 2=1) then {weqe//}
writeln(2)
else writeln(0);
end;
begin
if r1=r2 then
k:=abs(c2-c1)
else if c1=c2 then
k:=abs(r2-r1)
else k:=abs(c2-c1);
writeln(k);
end;
end.

Program a370;
uses math;
const   fi                      =       '';
        fo                      =       '';
var     f                       :       text;
        r1,c1,r2,c2             :       longint;
BEGIN
        READ(r1,c1,r2,c2);
        If (r1=r2) and (c1=c2) then
             begin
                write(0,' ',0,' ',0);
                halt;
             end;
        If (r1=r2) or (c1=c2) then write (1,' ') else write(2,' ');
        IF ((r1+c1) mod 2) <> ((r2+c2) mod 2) then write(0,' ')
         else
          if ((r1-c1) = (r2-c2)) or (r1+c1=r2+c2) then write(1,' ')
           else write(2);
        write(max(abs(r1-r2),abs(c1-c2)));
END.

Program a370;
uses math;
const   fi                      =       '';
        fo                      =       '';
var     f                       :       text;
        r1,c1,r2,c2             :       longint;
BEGIN
        READ(r1,c1,r2,c2);
        If (r1=r2) and (c1=c2) then
             begin
                write(0,' ',0,' ',0);
                halt;
             end;
        If (r1=r2) or (c1=c2) then write (1,' ') else write(2,' ');
        IF (r1+c1) mod 2 <> (r2+c2) mod 2 then write(0,' ')
         else
          if abs(r1+c1) = abs(r2+c2) then write(1,' ')
           else write(2,' ');
        write(max(abs(r1-r2),abs(c1-c2)));
END.

var
 r1,c1,r2,c2:longint;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2)or(c1=c2) then write('1 ')
  else write('2 ');
 if (r1+c1=r2+c2)or(r1-c1=r2-c2) then write(1)
  else if not((r1-c1) mod 2=(r2+c2)) then write(0)
   else write(2);
end.

uses math;
var
 r1,c1,r2,c2:longint;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2)or(c1=c2) then write('1 ')
  else write('2 ');
 if (r1+c1=r2+c2)or(r1-c1=r2-c2) then write(1)
  else if not((r1-c1) mod 2=(r2+c2) mod 2) then write(0)
   else write(2);
 write(max(abs(r1-r2),abs(c1-c2)));
end.

uses math;
var
 r1,c1,r2,c2:longint;
begin
 readln(r1,c1,r2,c2);
 if (r1=r2)or(c1=c2) then write('1 ')
  else write('2 ');
 if (r1+c1=r2+c2)or(r1-c1=r2-c2) then write('1 ')
  else if not((r1-c1) mod 2=(r2+c2) mod 2) then write('0 ')
   else write('2 ');
 write(max(abs(r1-r2),abs(c1-c2)));
end.

var  x1,x2,y1,y2:longint;
function max(a,b:longint):longint;
begin
if a>b then max:=a else max:=b;
end;
begin
{assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);   }
readln(x1,y1,x2,y2);
if (x1=x2) and (y1=y2) then begin writeln('0 0 0 '); halt; end;
if (x1=x2) or (y1=y2) then write('1 ') else write('2 ');
if (x1 mod 2 = y1 mod 2) and (x2 mod 2<>y2 mod 2) then write('0 ')
                                                  else if abs(x1-x2)=abs(y1-y2) then write('1 ') else write('2 ');
write(max(abs(x1-x2),abs(y1-y2)));

{close(input);
close(output);   }
end.

{$MODE OBJFPC}
program proA370;
uses
  math;
const
  fi = 'proA370.inp';
var
  r1, c1, r2, c2 : Integer;

begin
  {$ifndef online_judge}
  assign(input, fI); reset(input);
  {$endif}
  readln(r1, c1, r2, c2);

  if (r1 = r2) or (c1 = c2) then write(1,' ') else write(2,' ');

  if (r1 - c1 = r2 - c2) or (r1 + c1 = r2 + c2) then write(1,' ') else
  if ((r1 + c1 + r2 + c2) mod 2 = 0) then write(2,' ') else write(0,' ');

  writeln(abs(r1 - r2) + Min( abs(c2 - (r2 - r1 + c1)), abs(c2 - (r1 + c1 - r2) ) ));
end.

program aaa1;
var
   a,c1,c2,b,r1,r2,f : integer;
begin
      read(r1,c1,r1,c2);
      if (r1=r2) or (c1=c2) then a:=1
      else a:=2;
      if (abs(r1-r2)+abs(c1-c2)) mod 2 =0 then
      if abs(r1-r2)=abs(c1-c2) then b:=1
      else b:=2
      else b:=0;

      if abs(r1-r2)>abs(c1-c2) then f:= abs(r1-r2)
      else f:=abs(c1-c2);

      writeln(a,' ',b,' ',f);

end.

program aaa1;
var
   a,c1,c2,b,r1,r2,f : integer;
begin
      read(r1,c1,r1,c2);
      if (r1=r2) or (c1=c2) then a:=1
      else a:=2;
      if (abs(r1-r2)+abs(c1-c2)) mod 2 =0 then
      if abs(r1-r2)=abs(c1-c2) then b:=1
      else b:=2
      else b:=0;

      if abs(r1-r2)>abs(c1-c2) then f:= abs(r1-r2)
      else f:=abs(c1-c2);

      writeln(a,' ',b,' ',f);
      readln; readln;

end.

var
r1,c1,r2,c2,l,e,k,max:integer;
begin
readln(r1,c1,r2,c2);max:=abs(r1-r2);
if (c1=c2) or (r1=r2) then
l:=1
else l:=2;
if (r1+r2=c1+c2) or (r1-r2=c1-c2) then
e:=1
else if ((r1+c1) mod 2)<>((r2+c2) mod 2) then
e:=0
else e:=2;
if abs(c1-c2)>max then
max:=abs(c1-c2);
k:=max;
writeln(l,' ',e,' ',k);
end.

var
r1,c1,r2,c2,l,e,k,max:integer;
begin
readln(r1,c1,r2,c2);max:=abs(r1-r2);
if (c1=c2) or (r1=r2) then
l:=1
else l:=2;
if (r1+r2=c1+c2) or (abs(r1-r2)=abs(c1-c2)) then
e:=1
else if ((r1+c1) mod 2)<>((r2+c2) mod 2) then
e:=0
else e:=2;
if abs(c1-c2)>max then
max:=abs(c1-c2);
k:=max;
writeln(l,' ',e,' ',k);
end.

var
r1,c1,r2,c2,l,e,k,max:integer;
begin
readln(r1,c1,r2,c2);max:=abs(r1-r2);
if (c1=c2) or (r1=r2) then
l:=1
else l:=2;
if (r1+r2=c1+c2) and (abs(r1-r2)=abs(c1-c2)) then
e:=1
else if ((r1+c1) mod 2)<>((r2+c2) mod 2) then
e:=0
else e:=2;
if abs(c1-c2)>max then
max:=abs(c1-c2);
k:=max;
writeln(l,' ',e,' ',k);
end.

uses math;
Var  x1,x2,y1,y2:longint;
    lechcot,lechhang:longint;

Procedure doc;
begin
    Readln(x1,y1,x2,y2);
end;

procedure xuly;
begin
    If (x1=x2) and (x2=y2) then
        begin
            Writeln(0,' ',0,' ',0);
            halt;
        end;
    If (x1=x2) or (y1=y2) then
            Write(1,' ')
    else
        Write(2,' ');
    If ((x1+y1) mod 2)<>((x2+y2) mod 2) then
        Write(0,' ')
    else
    If (x1+y1=x2+y2) or (x1-x2=y1-y2) then
        Write(1,' ')
    else
        Write(2,' ');
    lechcot:=abs(x1-x2);
    lechhang:=abs(y1-y2);
    Write(max(lechcot,lechhang));
end;

begin
    doc;
    xuly;
end.

uses math;
var c1, c2, r1, r2: longint;
begin
read(r1, c1, r2, c2);
if (r1=r2) or (c1=c2) then write(1, ' ')
else write(2, ' ');
if (max(r1, r2) mod min(r1, r2)) mod 2= (max(c1, c2) mod min(c1, c2)) mod 2 then
begin
if abs(r1-r2)=abs(c1-c2) then write(1, ' ')
else write(2, ' ');
end
else write(0, ' ');
write(max(abs(c1-c2), abs(r1-r2)));
end.

var r1,c1,r2,c2:integer;
    a1,a2,a3:integer;
begin
readln(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then a1:=1
                      else a1:=2;
if (r1-c1=r2-c2) or (r1+c1=r2+c2) then a2:=1;
if ((r1+c1) mod 2=0) and ((r2+c2) mod 2=0) then a2:=2;
if abs(r1-r2)>abs(c1-c2) then a3:=abs(r1-r2)
                         else a3:=abs(c1-c2);
writeln(a1,' ',a2,' ',a3);
end.

var r1,c1,r2,c2:integer;
    a1,a2,a3:integer;
begin
readln(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then a1:=1
                      else a1:=2;
if (r1-c1=r2-c2) or (r1+c1=r2+c2) then a2:=1;
if abs(r1-r2)>abs(c1-c2) then a3:=abs(r1-r2)
                         else a3:=abs(c1-c2);
writeln(a1,' ',a2,' ',a3);
end.

uses Math;
const
        fil='';
        fil2='';
var
        r1,r2,c1,c2:longint;
procedure nhap;
begin
        assign(input,fil); reset(input);
        assign(output,fil2); rewrite(output);
        readln(r1,c1,r2,c2);
end;
procedure xuli;
var a,b,c:longint;
begin
        if (r1=r2) then a:=1
        else if c1=c2 then a:=1
        else a:=2;
        if (odd(r1) = odd(c1))=(odd(r2) = odd(c2)) then
        begin
                if abs(r1-r2)=abs(c1-c2) then b:=1
                else b:=2;
        end else b:=0;
        c:=max(r2-r1,c2-c1);
        write(a,' ',b,' ',c);
end;
begin
        nhap;
        xuli;
end.

program codeforces;

(* Main code is here ... *)

var
	t, r1, r2, c1, c2 : integer;
begin
	read(r1, c1, r2, c2);
	if (r1 = r2) and (c1 = c2) then
	begin
		writeln(0, ' ', 0, ' ', 0);
		exit;
	end;
	(* Rook *)
	t := 0;
	if r1 <> r2 then t := t+1;
	if c1 <> c2 then t := t+1;
	write(t, ' ');
	(* Bishop *)
	t := 2;
	if abs(r1-r2) = abs(c1-c2) then t := 1;
	if abs(r1-r2)+abs(c1-c2) mod 2 = 1 then t := 0;
	write(t, ' ');
	(* King *)
	t := 0;
	if abs(r1-r2) > abs(c1-c2) then
		t := abs(r1-r2)
	else
		t := abs(c1-c2);
	write(t);
	writeln();
end.

program codeforces;

(* Main code is here ... *)

var
	t, r1, r2, c1, c2 : integer;
begin
	read(r1, c1, r2, c2);
	(* Rook *)
	t := 0;
	if r1 <> r2 then t := t+1;
	if c1 <> c2 then t := t+1;
	write(t, ' ');
	(* Bishop *)
	t := 2;
	if abs(r1-r2) = abs(c1-c2) then t := 1;
	write(t, ' ');
	(* King *)
	t := 0;
	if abs(r1-r2) > abs(c1-c2) then
		t := abs(r1-r2)
	else
		t := abs(c1-c2);
	write(t);
	writeln();
end.

program bt1177;
uses math;
const
  FI='';
  FO='';
var
  f:text;
  xe,tuong,vua:longint;
  r1,r2,c1,c2:longint;

procedure doc;
begin
  assign(f,FI);
  reset(f);
  read(f,r1,c1,r2,c2);
  close(f);
end;

procedure xuli;
begin
  if (r1=r2) or (c1=c2) then xe:=1
  else xe:=2;

  if ((r1+c1) mod 2= (r2+c2) mod 2) then
    if ((r1+c1)=(r2+c2)) or (abs(r1-c1)=abs(r2-c2)) then tuong:=1
    else tuong:=2
  else tuong:=0;

  vua:=max(abs(r1-r2),abs(c2-c1));

end;

procedure ghi;
begin
  assign(f,FO);
  rewrite(f);
  writeln(f,xe,' ',tuong,' ',vua);
  close(f);
end;

begin
  doc;
  xuli;
  ghi;
end.

Uses Math;
Var x1, y1, x2, y2, t1, t2, x: longint;
begin
 read(x1, y1, x2, y2);

 //Rook
 if(x1=x2) or (y1=y2) then
  write('1 ')
 else
  write('2 ');

 //Elephant
 if (x1+y1) mod 2 <> (x2+y2) mod 2 then
  write('0 ')
 else if abs(x1-x2)=abs(y1-y2) then
  write('1 ')
 else
  write('2 ');

 //King
 x:= abs(x1-x2);
 if y1+x>8 then
  t1:= 100500
 else
  t1:= abs(y1-y2);
 x:= abs(y1-y2);
 if x1+x>8 then
  t2:= 100500
 else
  t2:= abs(x1-x2);
 write(min(t1,t2));
end.

Uses Math;
Var x1, y1, x2, y2, t1, t2, x: longint;
begin
 read(x1, y1, x2, y2);

 //Rook
 if(x1=x2) or (y1=y2) then
  write('1 ')
 else
  write('2 ');

 //Elephant
 if (x1+y1) mod 2 <> (x2+y2) mod 2 then
  write('0 ')
 else if abs(x1-x2)=abs(y1-y2) then
  write('1 ')
 else
  write('2 ');

 //King
 x:= abs(x1-x2);
 t1:= x + abs(y1+x-y2);
 x:= abs(y1-y2);
 t2:= x + abs(x1+x-x2);
 write(min(t1,t2));
end.

Program KadalBonek;

var
	a,b,c,d : integer;

begin
	readln(a,b,c,d);
	if ((a = c) or (b = d)) then write('1 ')
	else write('2 ');

	if (((a = c) and ((b - d) mod 2 = 0)) or ((b = d) and ((a - c) mod 2 = 0))) then write('2 ')
	else if ((a = c) or (b = d)) then write('0 ')
	else if (((a-c)/(b-d)=1) or ((a-c)/(b-d)=-1)) then write('1 ')
	else if ((a mod 2 = c mod 2) and (b mod 2 = d mod 2)) then write('2 ')
	else write('0 ');

	if((a >= c)and(b >= d)) then
		if(a - c > b - d) then writeln(a - c)
		else writeln(b - d)
	else if((a >= c)and(b <= d)) then
		if(a - c > d - b) then writeln(a - c)
		else writeln(d - b)
	else if((a <= c)and(b >= d))then
		if(c - a > b - d) then writeln(c - a)
		else writeln(b - d)
	else
		if(c - a > d - b) then writeln(c - a)
		else writeln(d - b);
end.

var x1,y1,x2,y2:integer;
x,y:integer;
function min(a,b:integer):integer;
begin
 if a<b then min:=a else min:=b;
end;

function max(a,b:integer):integer;
begin
 if a>b then max:=a else max:=b;
end;

begin
readln(x1,y1,x2,y2);
if (x1=x2) or (y1=y2) then write('1 ') else write('2 ');
if x1-x2=y1-y2
 then
  begin
   write('1 ');
  end
 else
  begin
   if ((x1-1)*8+y1) mod 2=((x2-1)*8+y2) mod 2
    then write('2 ')
    else write('0 ');
  end;
 x:=abs(x1-x2);
 y:=abs(y1-y2);
 writeln(min(x,y)+abs(x-y));
end.

uses math;
const
    inp='';//370A.inp';
    out='';//370A.out';

var
    fi,fo:text;
    r1,c1,r2,c2:longint;

begin
    assign(fi,inp); assign(fo,out);
    reset(fi);      rewrite(fo);
    read(fi,r1,c1,r2,c2);
    if (r1=r2) and (r2=c2) then write(fo,'0 0 0')
    else
    begin
        if (r1=r2) or (c1=c2) then write(fo,1,' ') else write(fo,2,' ');
        if (r1+c1) mod 2<>(r2+c2) mod 2 then write(fo,0,' ') else
            if ((r1+c1)=(r2+c2)) or (r1-c1=r2-c2) then write(fo,1,' ') else write(fo,2,' ');
        write(fo,max(abs(r1-r2),abs(c1-c2)));
    end;
    close(fi);      close(fo);
end.

uses math;
var r,c,r1,c1:longint;
    s,l,k,x,y,z,i,j,m,n:longint;
     begin
      read(r,c,r1,c1);
       if (r=r1) or (c=c1) then Write(1,' ') else Write(2,' ');
        if (c=c1) and (abs(r-r1)>0) then Write(2,' ') else
        if (c=r) and (c1=r1) and ((abs(c1-r)=abs(c-r1))) or ((c1+r1)=(c+r))
        then Write(1,' ') else
         Write(0,' ');
       if (r=r1)  then Write(abs(c1-c),' ') else
       if (c1=c) then Write(abs(r-r1),' ') else
        begin
         Write(max(abs(c-c1),abs(r-r1)));
        end;
     end.

uses math;
var r,c,r1,c1:longint;
    s,l,k,x,y,z,i,j,m,n:longint;
     begin
      read(r,c,r1,c1);
       if (r=r1) or (c=c1) then Write(1,' ') else Write(2,' ');
        if (c=c1) and (abs(r-r1)>0) and ((r mod 2)=(r1 mod 2))then Write(2,' ') else
        if (r=r1) and (abs(c-c1)>0) and ((c mod 2)=(c1 mod 2))then Write(2,' ') else
        if (c=r) and (c1=r1) and ((abs(c1-r)=abs(c-r1))) or ((c1+r1)=(c+r))
        then Write(1,' ') else
         Write(0,' ');
       if (r=r1)  then Write(abs(c1-c),' ') else
       if (c1=c) then Write(abs(r-r1),' ') else
        begin
         Write(max(abs(c-c1),abs(r-r1)));
        end;
     end.

var
  x1,x2,y1,y2:longint;
  ans1,ans2,ans3:longint;

function max(a,b:longint):longint;
begin
  if a > b
  then exit(a)
  else exit(b);
end;

begin
  //Come and hack me if you can!
  read(x1,y1,x2,y2);
  if (x2 - x1) * (y2 - y1) = 0
  then ans1:=1
  else ans1:=2;
  if ((x1 + y1) and 2) <> ((x2 + y2) and 2)
  then ans2:=0
  else
  begin
    if (abs(x1 - y1) = abs(x2 - y2)) or (abs(x1 + y1) = abs(x2 + y2))
    then ans2:=1
    else ans2:=2;
  end;
  ans3:=max(abs(x1-x2),abs(y1-y2));
  writeln(ans1,' ',ans2,' ',ans3);
end.

var a,b,c,n,r1,c1,r2,c2,i,j:longint;

function max(a1,a2:longint):longint;
begin
max:=a1;
if a2>a1 then max:=a2;
end;

begin
readln(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then a:=1 else a:=2;
if (r1+c1)mod 2<>(r2+c2) mod 2 then b:=0 else
if r1+c1=r2+c2 then b:=1 else b:=0;
c:=max(abs(r1-r2),abs(c1-c2));
writeln(a,' ',b,' ',c);
end.

uses math;
var
  r1,c1,r2,c2:longint;
  ans1,ans2,ans3:longint;
begin
  read(r1,c1,r2,c2);
  if (r1=r2) and (c1=c2) then begin writeln(0,' ',0,' ',0); halt; end;

  if (r1=r2)  or (c1=c2) then ans1:=1
  else ans1:=2;

       if (r1+c1)mod 2<>(r2+c2)mod 2 then ans2:=0
  else if abs(r1-r2)+abs(c1-c2)<>0             then ans2:=1
  else                                    ans2:=2;

  ans3:=max(abs(r2-r1),abs(c2-c1));
  writeln(ans1,' ',ans2,' ',ans3);
end.

uses math;
var r1,c1,r2,c2:byte; i:shortint;
begin
        read(r1,c1,r2,c2);
        if (r1=r2) or (c1=c2) then write('1 ')
        else write('2 ');
        if (c2-r2=c1-r1) or (r2+c2=r1+c1) then write('1 ')
        else begin
                i:=0;
                if r1 mod 2=0 then inc(i);
                if c1 mod 2=0 then inc(i);
                if r2 mod 2=0 then dec(i);
                if c2 mod 2=0 then dec(i);
                if i=0 then write('2 ')
                else write('0 ')
        end;
        write(max(abs(r1-r2),abs(c1-c2)))
end.

program codeforces;

(* Main code is here ... *)

var
	t, r1, r2, c1, c2 : integer;
begin
	read(r1, c1, r2, c2);
	(* Rook *)
	t := 0;
	if r1 <> r2 then t := t+1;
	if c1 <> c2 then t := t+1;
	write(t, ' ');
	(* Bishop *)
	t := 0;
	if abs(r1-r2) = abs(c1-c2) then t := 1;
	write(t, ' ');
	(* King *)
	t := 0;
	if abs(r1-r2) > abs(c1-c2) then
		t := abs(r1-r2)
	else
		t := abs(c1-c2);
	write(t);
	writeln();
end.

program sss;
var a,b,c,d:longint;
function max(x,y:longint):longint;
begin
        if x>y then exit(x);
        exit(y);
end;
begin
        readln(a,b,c,d);

        if (a=c)or(b=d) then write(1,' ')
        else write(2,' ');

        if (a+b)mod 2=(c+d)mod 2 then
        begin
                if a-c=abs(b-d) then write(1,' ')
                else write(2,' ');
        end
        else write(0,' ');

        writeln(max(abs(a-c),abs(b-d)));

end.

const   fi                      =       '';
        fo                      =       '';
var     f                       :       text;
        r1,c1,r2,c2             :       longint;
Function max(x,y:longint):longint;
begin
        IF x>y then exit(x);
        exit(y);
end;
BEGIN
        READ(r2,c1,r1,c1);
        If (r1=r2) and (c1=c2) then
             begin
                write(0,' ',0,' ',0);
                halt;
             end;
        If (r1=r2) or (c1=c2) then write (1,' ') else write(2,' ');
        IF ((r1+c1) mod 2) <> ((r2+c2) mod 2) then write(0,' ')
         else
          if ((r1-c1) = (r2-c2)) or (r1+c1=r2+c2) then write(1,' ')
           else write(2,' ');
        write(max(abs(r1-r2),abs(c1-c2)));
END.

var c,kp,kf,f,p,r1,c1,r2,c2,l,s,k:integer;
begin
read(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then l:=1 else l:=2;
if (r1 mod 2*c1 mod 2<> r2 mod 2* c2 mod 2)then s:=0 else
begin
for p:=-8 to 8 do begin
if ((r1+p=r2) and (c1+p=c2)) or ((r1-p=r2) and (c1+p=c2)) then s:=1;
end;
if (s=0)then s:=2;
end;
for p:=-8 to 8 do begin
for f:=-8 to 8 do begin
if (r1+p=r2) and (c1+f=c2) then begin
kp:=abs(p);
kf:=abs(f);
end;
end;
end;
if (kp<kf) then begin
c:=kp;
kp:=kf;
kf:=c;
end;
k:=kp;
write(l,' ',s,' ',k);
end.

var
s1,s2,r1,r2,c1,c2:integer;
begin

read(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then write(1,' ')
   else write(2,' ');
if (r1+c1 = r2+c2) or (r1-c1 = r2-c2) then write(1,' ')
   else  if (r1+c1 mod 2) = (r2+c2 mod 2 ) then write(2,' ')
     else write(0,' ');
if (r1+c1 = r2+c2) or (r1-c1 = r2-c2) then begin
  s1:=r1-r2;
  write(abs(s1));
  end
  else begin
  s1:=r2-r1;
  s2:=c2-c1;
  if s2 > s1 then write(s2) else write(s1);
  end;

end.

var
s1,s2,r1,r2,c1,c2:integer;
begin

read(r1,c1,r2,c2);
if (r1=r2) or (c1=c2) then write(1,' ')
   else write(2,' ');
if (r1+c1 = r2+c2) or (r1-c1 = r2-c2) then write(1,' ')
   else  if (r1+c1 mod 2) = (r2+c2 mod 2 ) then write(2,' ')
     else write(0,' ');
if (r1+c1 = r2+c2) or (r1-c1 = r2-c2) then begin
  s1:=r1-r2;
  write(abs(s1));
  end
  else begin
  if (c1=c2)or(r1=r2) then begin
    s1:=(c2-c1)+(r2-r1);
    write(abs(s1))
    end
    else begin
  s1:=r1-r2-c2+c1;
  s2:=c2-c1;
  write(abs(s1)+abs(s2));
  end;
  end;
end.

var
r1,c1,r2,c2: byte;
lad,slon,korol:byte;

begin
read (r1,c1,r2,c2);

{ход ладьи-}
if (abs(r1-r2)>0) and (abs(c1-c2)>0) then lad:=2
  else if (abs(r1-r2)>0) or (abs(c1-c2)>0) then lad:=1
  else lad:=0;
write(lad,' ');

{ход слоном -}
if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
  if (abs (r1-r2) = abs(c1-c2)) then slon:=1
    else slon:=2
else
  slon:=0;
write(slon,' ');

{ход королем -}
if (r1-r2=0) then korol:=abs(c1-c2)
else
  if (c1-c2=0) then korol:=abs(r1-r2)
  else
    if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(r1-r2)
      else korol:=abs(c1-c2)
    else
     korol:=abs(c1-c2)+1;
write(korol,' ');

end.

var
r1,c1,r2,c2: byte;
lad,slon,korol:byte;

begin
read (r1,c1,r2,c2);

{ход ладьи-}
if (abs(r1-r2)>0) and (abs(c1-c2)>0) then lad:=2
  else if (abs(r1-r2)>0) or (abs(c1-c2)>0) then lad:=1
  else lad:=0;
write(lad,' ');

{ход слоном -}
if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
  if (abs (r1-r2) = abs(c1-c2)) then slon:=1
    else slon:=2
else
  slon:=0;
write(slon,' ');

{ход королем -}
if (r1-r2=0) then korol:=abs(c1-c2)
else
  if (c1-c2=0) then korol:=abs(r1-r2)
  else
    if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(r1-r2)
      else korol:=abs(c1-c2)
    else
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(r1-r2)+1
      else korol:=abs(c1-c2)+1;
write(korol,' ');

end.

var
r1,c1,r2,c2: byte;
lad,slon,korol:byte;

begin
read (r1,c1,r2,c2);

{ход ладьи-}
if (abs(r1-r2)>0) and (abs(c1-c2)>0) then lad:=2
  else if (abs(r1-r2)>0) or (abs(c1-c2)>0) then lad:=1
  else lad:=0;
write(lad,' ');

{ход слоном -}
if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
  if (abs (r1-r2) = abs(c1-c2)) then slon:=1
    else slon:=2
else
  slon:=0;
write(slon,' ');

{ход королем -}
if (r1-r2=0) then korol:=abs(c1-c2)
else
  if (c1-c2=0) then korol:=abs(r1-r2)
  else
    if (r1 mod 2 = c1 mod 2) and (r2 mod 2 = c2 mod 2) or (r1 mod 2 <> c1 mod 2) and (r2 mod 2 <> c2 mod 2) then
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(r1-r2)
      else korol:=abs(c1-c2)
    else
      if (abs(r1-r2)>abs(c1-c2)) then korol:=abs(c1-c2)+1
      else korol:=abs(r1-r2)+1;
write(korol,' ');

end.