#include <iostream>
#include <memory>
int main()
{
using namespace std;
int *raw_pointer = new int(42);
shared_ptr<int> shared_pointer(raw_pointer);
weak_ptr<int> weak_pointer(shared_pointer);
cout << boolalpha << (weak_pointer.lock().get() == raw_pointer) << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5PgoKaW50IG1haW4oKQp7Cgl1c2luZyBuYW1lc3BhY2Ugc3RkOwoJaW50ICpyYXdfcG9pbnRlciA9IG5ldyBpbnQoNDIpOwoJc2hhcmVkX3B0cjxpbnQ+IHNoYXJlZF9wb2ludGVyKHJhd19wb2ludGVyKTsKCXdlYWtfcHRyPGludD4gd2Vha19wb2ludGVyKHNoYXJlZF9wb2ludGVyKTsKCWNvdXQgPDwgYm9vbGFscGhhIDw8ICh3ZWFrX3BvaW50ZXIubG9jaygpLmdldCgpID09IHJhd19wb2ludGVyKSA8PCAnXG4nOwp9