#include int main() { __int64 m,n,k; scanf("%I64d",&k); while(k--) {scanf("%I64d%I64d",&m,&n); printf("%I64d\n",m/2+n/2);} }