#include #include #include #define ll long long using namespace std; int n,a,b; int main() { int i,j,k; cin>>n; for (i=1;i<=n;i++) scanf("%d%d",&a,&b),printf("%d\n",a/2+b/2); }