#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <iterator>
using namespace std;
int main() {
set<int> s1;
set<int> s2;
vector<int> s3;
s1.insert(1);
s1.insert(2);
s1.insert(3);
s1.insert(4);
s2.insert(1);
s2.insert(6);
s2.insert(3);
s2.insert(0);
set_intersection(s1.begin(),s1.end(),s2.begin(),s2.end(), std::back_inserter(s3));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8aXRlcmF0b3I+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICBzZXQ8aW50PiBzMTsKICBzZXQ8aW50PiBzMjsKICB2ZWN0b3I8aW50PiBzMzsKICAKICBzMS5pbnNlcnQoMSk7CiAgczEuaW5zZXJ0KDIpOwogIHMxLmluc2VydCgzKTsKICBzMS5pbnNlcnQoNCk7CgogIHMyLmluc2VydCgxKTsKICBzMi5pbnNlcnQoNik7CiAgczIuaW5zZXJ0KDMpOwogIHMyLmluc2VydCgwKTsKCiAgc2V0X2ludGVyc2VjdGlvbihzMS5iZWdpbigpLHMxLmVuZCgpLHMyLmJlZ2luKCksczIuZW5kKCksIHN0ZDo6YmFja19pbnNlcnRlcihzMykpOwogIHJldHVybiAwOwp9