#include <iostream>
#include <sstream>
using namespace std;
void log(ostream& o) {
stringstream* s = dynamic_cast<stringstream*>(&o);
if (s) {
cout << s->str() << endl;
}
}
int main() {
int x = 5, y = 6;
log(stringstream() << "x=" << x << ", y=" << y);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnZvaWQgbG9nKG9zdHJlYW0mIG8pIHsKCXN0cmluZ3N0cmVhbSogcyA9IGR5bmFtaWNfY2FzdDxzdHJpbmdzdHJlYW0qPigmbyk7CglpZiAocykgewoJICAgIGNvdXQgPDwgcy0+c3RyKCkgPDwgZW5kbDsKCX0KfQoKaW50IG1haW4oKSB7CglpbnQgeCA9IDUsIHkgPSA2OwoJbG9nKHN0cmluZ3N0cmVhbSgpIDw8ICJ4PSIgPDwgeCA8PCAiLCB5PSIgPDwgeSk7CglyZXR1cm4gMDsKfQ==