#include using namespace std; void solve(){ auto f=[&](int i1,int j1,int i2,int j2){ int di=abs(i1-i2),dj=abs(j1-j2); if (di==0&&dj==0) return true; if (di==0||dj==0||di==dj) return true; return false; }; int h,w; cin>>h>>w; int py=-1; int t=0; while (true){ int x,y; cin>>x>>y; if (x==0) return; if (t==0){ cout<<1<<" "<>t; while (t--) solve(); }