#include <iostream>
#include <iomanip>
using namespace std;
pair<double, double> SumDob (double a, double b){
return make_pair(a + b, a * b);
}
int main() {
int n;
cin>>n;
while (n--){
double a, b;
cin>>a>>b;
cout<<fixed<<setprecision(4)<<SumDob(a,b).first<<" "<<SumDob(a,b).second<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnBhaXI8ZG91YmxlLCBkb3VibGU+IFN1bURvYiAoZG91YmxlIGEsIGRvdWJsZSBiKXsKCXJldHVybiBtYWtlX3BhaXIoYSArIGIsIGEgKiBiKTsKfQogCmludCBtYWluKCkgewoJaW50IG47CgljaW4+Pm47Cgl3aGlsZSAobi0tKXsKCQlkb3VibGUgYSwgYjsKCQljaW4+PmE+PmI7CgkJY291dDw8Zml4ZWQ8PHNldHByZWNpc2lvbig0KTw8U3VtRG9iKGEsYikuZmlyc3Q8PCIgIjw8U3VtRG9iKGEsYikuc2Vjb25kPDxlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=