#include using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 1e5+50; const int oo = 1e9; int x,y,x2,y2,n; int dx[] = {-1,1,2,1,-1,-2}; int dy[] = {-2,-2,0,2,2,0}; string dir[] = {"UL","UR","R","LR","LL","L"}; bool v[201][201]; vector ans[201][201]; void bfs(){ queue> q; q.push({x,y}); v[x][y]=1; while(!q.empty()){ int lx = q.front().first; int ly = q.front().second; q.pop(); if(lx==x2&&ly==y2){ cout << ans[lx][ly].size() << endl; for(int i=0;i=n||ny<0||ny>=n)continue; if(v[nx][ny])continue; v[nx][ny]=1; ans[nx][ny] = ans[lx][ly]; ans[nx][ny].push_back(i); q.push({nx,ny}); } } puts("Impossible"); } int main(){ cin>>n>>y>>x>>y2>>x2; bfs(); }