#include #include #include #include #include using namespace std; int main() { long long n; cin >> n; for (size_t i = 0; i < n; i++) { int a, b,ans; cin >> a >> b; cout << a / 2 + b / 2 << "\n"; } }