#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef pairpint; typedef vectorvint; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);i++) templatevoid chmin(T &t,U f){if(t>f)t=f;} templatevoid chmax(T &t,U f){if(ta,b; int W,H,N; signed main(){ cin>>W>>H>>N; rep(i,N){ int x,y; cin>>x>>y; a.insert(x); b.insert(y); } cout<