using static System.Console;
using System.Numerics;
public class Program {
public static void Main() {
WriteLine(VerificaPermissao((BigInteger)1, (BigInteger)0));
WriteLine(VerificaPermissao((BigInteger)1, (BigInteger)1));
WriteLine(VerificaPermissao((BigInteger)2, (BigInteger)1));
}
public static bool VerificaPermissao(BigInteger perm1, BigInteger perm) {
return (perm & perm1) != 0;
}
}
//https://pt.stackoverflow.com/q/202352/101
dXNpbmcgc3RhdGljIFN5c3RlbS5Db25zb2xlOwp1c2luZyBTeXN0ZW0uTnVtZXJpY3M7CgpwdWJsaWMgY2xhc3MgUHJvZ3JhbSB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpIHsKICAgICAgICBXcml0ZUxpbmUoVmVyaWZpY2FQZXJtaXNzYW8oKEJpZ0ludGVnZXIpMSwgKEJpZ0ludGVnZXIpMCkpOwogICAgICAgIFdyaXRlTGluZShWZXJpZmljYVBlcm1pc3NhbygoQmlnSW50ZWdlcikxLCAoQmlnSW50ZWdlcikxKSk7CiAgICAgICAgV3JpdGVMaW5lKFZlcmlmaWNhUGVybWlzc2FvKChCaWdJbnRlZ2VyKTIsIChCaWdJbnRlZ2VyKTEpKTsKICAgIH0KICAgIHB1YmxpYyBzdGF0aWMgYm9vbCBWZXJpZmljYVBlcm1pc3NhbyhCaWdJbnRlZ2VyIHBlcm0xLCBCaWdJbnRlZ2VyIHBlcm0pIHsKICAgICAgICByZXR1cm4gKHBlcm0gJiBwZXJtMSkgIT0gMDsKICAgIH0KfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMjAyMzUyLzEwMQ==