#include #include #include using namespace std; int main() { int t,i,n,is,js,ie,je,m=0,ul=0,ur=0,lr=0,ll=0,l=0,r=0,h=0; cin>>n>>is>>js>>ie>>je;t=js; //is--;ie--;js--;je--;h=js; int a=fabs(is-ie);int b=fabs(js-je); if(a%2==0||(b%2!=0||b==0)) {if(ie>is) {while(is!=ie) {if(je>js) { m++;is+=2; lr++;h++;} else { m++;is+=2; ll++;h--;} js+=h; }} else { while(is!=ie) {if(je>js) { m++;is-=2; ur++;h++;} else { m++;is-=2; ul++;h--;} js+=h; }} js=t; js+=h; if(je>js) {while(je!=js) {if(js<0||js>je) {cout<<"Impossible";exit(0);} m++;r++;js+=2;}} else {while(je!=js) {if(js<0||js