#include<bits/stdc++.h> #define int long long using namespace std; int n,m,k,l,x,y,a,b,ans; char ch[1010][1010]; bool book[1010][1010]; int ne[4][2]={1,0,-1,0,0,1,0,-1}; struct node{ int x,y,z; }; void slove(){ cin>>n>>m>>a>>b>>x>>y; ans=1e18; for(int i=1;i&...