#include int main() { int T; scanf("%d",&T); int i,q,w,l; for(l=1;l<=T;l++) { int a,b; scanf("%d%d",&a,&b); int sum=a/2+b/2; printf("%d\n",sum); } }