Little Petya is learning to play chess. He has already learned how to move a king, a rook and a bishop. Let us remind you the rules of moving chess pieces. A chessboard is 64 square fields organized into an 8 × 8 table. A field is represented by a pair of integers (*r*, *c*) — the number of the row and the number of the column (in a classical game the columns are traditionally indexed by letters). Each chess piece takes up exactly one field. To make a move is to move a chess piece, the pieces move by the following rules:
 -  A rook moves any number of fields horizontally or vertically. -  A bishop moves any number of fields diagonally. -  A king moves one field in any direction — horizontally, vertically or diagonally. 
Petya is thinking about the following problem: what minimum number of moves is needed for each of these pieces to move from field (*r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>) to field (*r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub>)? At that, we assume that there are no more pieces besides this one on the board. Help him solve this problem.
The input contains four integers *r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>, *r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub> (1 ≤ *r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>, *r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub> ≤ 8) — the coordinates of the starting and the final field. The starting field doesn't coincide with the final one.

You can assume that the chessboard rows are numbered from top to bottom 1 through 8, and the columns are numbered from left to right 1 through 8.
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 30 23:54:47 2020

@author: alexi
"""



#https://codeforces.com/problemset/problem/370/A --- Alexis Galvan

class Node():
    
    def __init__(self, parent = None, position = None):
        self.parent = parent
        self.position = position
        self.g = 0
        self.h = 0
        self.f = 0
        
    def __eq__(self, other):
        return self.position == other.position
    
def heuristic(A, B):
    return abs(A[0]-B[0]) + abs(A[1]-B[1])

def Astar(maze, start, end, piece):
    
    start_node = Node(None, start)
    start_node.g = 0
    start_node.h = heuristic(start, end)
    start_node.f = start_node.g + start_node.h
    
    end_node = Node(None, end)
    end_node.g = heuristic(start, end)
    end_node.h = 0
    end_node.f = end_node.g + end_node.h

    open_list = []
    closed_list = []
    
    open_list.append(start_node)
    
    while True:
        
        if len(open_list) == 0:
            return -1
        
        current_node = open_list[0]
        current_index = 0
        
        for index, item in enumerate(open_list):
            if item.f < current_node.f:
                current_node = item
                current_index = index
        
        open_list.pop(current_index)
        closed_list.append(current_node)
        
        if current_node == end_node:
            path = []
            current = current_node
            while current is not None:
                path.append(current.position)
                current = current.parent
            
            return len(path)
        else:
            
            if piece == 1:
                
                children = []
                
                for new_position in [(-1, -1),(-1, 1),(1, -1),(1, 1)]:
                    
                    node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1])
                    
                    if node_position[0] > (len(maze)-1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze)-1])-1) or node_position[1] < 0:
                        continue
                    
                    if maze[node_position[0]][node_position[1]] != 0:
                        continue
                    
                    new_node = Node(current_node, node_position)
                    new_node.g = current_node.g + 1
                    new_node.h = heuristic(new_node.position, end)
                    new_node.f = new_node.g + new_node.h
                    
                    children.append(new_node)
            else:
                children = []
                
                for new_position in [(0, -1),(0, 1),(1, 0),(-1, 0),(-1, -1),(-1, 1),(1, -1),(1, 1)]:
                    
                    node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1])
                    
                    if node_position[0] > (len(maze)-1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze)-1])-1) or node_position[1] < 0:
                        continue
                    
                    if maze[node_position[0]][node_position[1]] != 0:
                        continue
                    
                    new_node = Node(current_node, node_position)
                    new_node.g = current_node.g + 1
                    new_node.h = heuristic(new_node.position, end)
                    new_node.f = new_node.g + new_node.h
                    
                    children.append(new_node)        
                    
            visited = False
            
            for child in children:
                for open_child in open_list:
                    if child.position == open_child.position:
                        if child.f < open_child.f:
                            open_child = child
                        visited = True
                
                for closed_child in closed_list:
                    if child.position == closed_child.position:
                        if child.f < closed_child.f:
                            closed_child = child
                        visited = True
                
                if visited:
                    visited = False
                else:
                    open_list.append(child)
                

def chess_moves():
    
    moves = list(map(int, input().split()))
    
    if moves[0] == moves[1] == moves[2] == moves[3]:
        return '0 0 0'
    
    rook = (moves[0],moves[1])
    bishop = rook
    
    final = ''
    
    if rook[0] == moves[2] or rook[0] == moves[3] or rook[1] == moves[2] or rook[1] == moves[3]:
        final = final + '1 '
    else:
        final = final + '2 '
        
    if Astar(maze, rook, (moves[2],moves[3]), 1) == -1:
        final = final + '0 '
    else:  
        temp_bishop = abs(moves[2]-bishop[0])
        
        if bishop[1]+temp_bishop != moves[3] or bishop[1]-temp_bishop != moves[3]:
            final = final + '1 '
        else:
            final = final + '2 '
        
    king_moves = Astar(maze, rook, (moves[2],moves[3]), 0)
    
    final = final + str(king_moves-1)

    return final

maze = [[0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0]]

print(chess_moves())
    