#include #include #include #include using namespace std; int main() { int T,i,j,n,m; scanf("%d",&T); while(T--) { scanf("%d%d",&n,&m); printf("%d\n",(n/2+m/2)); } }