#include using namespace std; int main() { int T=0; cin>>T; while(T--) { int n=0,m=0; int sum=0; cin>>n>>m; cout<<(n/2+m/2)<