#include #include #include #include #include #include using namespace std; int main() { int grid_size; cin>>grid_size; string s=""; int ey,ex,sy,sx; cin>>sx>>sy>>ex>>ey; int ltr,utd; if(sx0)//LL { nom++; sy-=1; sx+=2; s.append("LL "); } else//L { nom++; sy-=2; s.append("L "); } } else if(y>0)// UR, R, LR { if(x<0)//UR { nom++; sy+=1; sx-=2; s.append("UR "); } else if(x>0)//LR { nom++; sy+=1; sx+=2; s.append("LR "); } else//R { nom++; sy+=2; s.append("R "); } } else if(y==0)//,UL, LR { if(x>0)//LR { nom++; sy+=1; sx+=2; s.append("LR "); } else if(x<0)//UL { nom++; sy-=1; sx-=2; s.append("UL "); } } if((utd==1 && sx>ex) || (utd==0 && sxey) || (ltr==0 && sy