#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. diag = "" vert = "" x = i_end - i_start y = j_end - j_start if x <= 0: vert = "" if y%2 == 1: print("Impossible") else: v1 = y//2 v2 = x - v1 if v2%2 == 1: print("Impossible") else: v2 = v2//2 if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)