#include #define NMAX 10000 #define MMAX 1000 using namespace std; int main(){ int N; int A[NMAX],B[NMAX]; int M; int X,Y; int cnt[MMAX]; int cntmax; cin>>N; for(int i=0;i>A[i]>>B[i]; } cntmax=0; cin>>M; for(int i=0;i>X>>Y; cnt[i]=0; for(int j=0;j=X&&B[j]<=Y){ cnt[i]++; } } if(cntmax