#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>N[0]; FOR(i,N[0]) cin>>W[0][i]; cin>>N[1]; FOR(i,N[1]) cin>>W[1][i]; sort(W[0],W[0]+N[0]); sort(W[1],W[1]+N[1]); int ma=0; FOR(k,2) { x=W[k][N[k]-1]; y=1; i=k^1; while(1) { for(j=N[i]-1;j>=0;j--) { if(W[i][j]