Problems
565 - Attack
SUBMIT PROBLEM

Attack

Time Limit: 0.5 sec

 

The Problem

Mita and Rita are two sisters. All time they are play many games like  “Ekka Dokka”, ”ludu”, ”chess” etc. But they are now bored for this type game. Try to find new game. Suddenly Rita got an idea for their new game. She drawn a picture in the land. Like that:  

 

 

Suppose Rita stand one part of the matrix and Mita stand another part of the matrix. They want to attack each other. But they can move only diagonally and they cannot go one color to another color. Now you are given their position. You have to find minimum moves to attack one to another.

 

The Input

The input file contains several test cases. Each case contain four integers r1, c1, r2, c2(r means row and c means column) denoting the position of the two sisters. Each of the integer will be positive not greater than 10^9. You can also assume that the positions will be distinct.

 

The Output

For each case find out the minimum moves required to attack one to another. Print 'impossible' if it's not possible.

 

Sample Input

1  1  10  10

1  1  10  11

 

Sample Output

Case 1: 1

Case 2: impossible

 

 

 

 

Problem Setter: Priash chowdhury [BGC Trust University Bangladesh]