#include <iostream>
using namespace std;
struct foo {
foo() { cout << "foo" << endl; }
~foo() { cout << "~foo" << endl; }
};
void bar()
{
cout << "in bar(drinking)" << endl;
static foo barinstance;
}
void baz()
{
cout << "in baz" << endl;
static foo bazinstance;
}
int main() {
int a;
cin >> a;
if(a % 2) bar();
if(a % 3) baz();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IGZvbyB7Cglmb28oKSB7IGNvdXQgPDwgImZvbyIgPDwgZW5kbDsgfQoJfmZvbygpIHsgY291dCA8PCAifmZvbyIgPDwgZW5kbDsgfQp9OwoKdm9pZCBiYXIoKQp7Cgljb3V0IDw8ICJpbiBiYXIoZHJpbmtpbmcpIiA8PCBlbmRsOwoJc3RhdGljIGZvbyBiYXJpbnN0YW5jZTsKfQoKdm9pZCBiYXooKQp7Cgljb3V0IDw8ICJpbiBiYXoiIDw8IGVuZGw7CglzdGF0aWMgZm9vIGJhemluc3RhbmNlOwp9CgppbnQgbWFpbigpIHsKCWludCBhOwoJY2luID4+IGE7CglpZihhICUgMikgYmFyKCk7CglpZihhICUgMykgYmF6KCk7CglyZXR1cm4gMDsKfQ==