The first line of input contains N and M (1< =N,M< =1000). The second line contains integers fx and fy, and the third line contains bxbx and byby (0< =fx,fy,bx,by< =10000). The next line contains a string of length N describing FJ's path, and the final line contains a string of length MM describing Bessie's path.
It is guranteed that Farmer John and Bessie's coordinates are always in the range (0< =x,y< =1000) throughout their journey. Note that East points in the positive x direction and North points in the positive y direction.