#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int count_UL = 0, count_UR = 0, count_R = 0, count_L = 0, count_LR = 0, count_LL = 0; while(n>-1 && (i_start > -1 && i_start < n && j_start > -1 && j_start < n)){ if(i_start > i_end && j_start > j_end) //UL { count_UL++; //j_start = Lx(j_start); i_start = Uy(i_start); j_start = j_start - 1; i_start = i_start - 2; //cout< i_end && j_start < j_end) //UR { count_UR++; //j_start = Rx(j_start); i_start = Uy(i_start); j_start = j_start + 1; i_start = i_start + 2; //cout< j_end) //LL { count_LL++; //j_start = Lx(j_start); i_start = Ly(i_start); j_start = j_start - 1; i_start = i_start + 2; //cout< j_end) //L { count_L++; //j_start = L_(j_start); j_start = j_start - 2; //cout< i_end) { count_UL++; //j_start = Lx(j_start); i_start = Uy(i_start); j_start = j_start - 1; i_start = i_start - 2; //cout< n-1 || i_start < 0 || i_start > n-1) { cout<<"Impossible"; return; } // Print the distance along with the sequence of moves. } int main() { int n; cin >> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }