#include n,m,i,j;long long x,y,a,t;main(){for(scanf("%d%d",&n,&m);iy?x:y);}