#include #include #include #include using namespace std; typedef long long ll; typedef pair P; typedef pair llP; ll mod(ll a, ll b){ ll ret=a%b; if(ret<0) ret+=b; return ret; } ll modpow(ll a,ll b,ll c){ ll res=1; while(b>0){ if(b&1) res=mod(res*a,c); a=mod(a*a,c); b>>=1; } return res; } int main() { int n; cin>>n; int a[n],b[n]; for(int i=0;i>a[i]; for(int i=0;i>b[i]; int ans=0; for(int i=0;i