#include <iostream>
using namespace std;
bool check(int a) {
return 0 <= a && a < 16;
}
template<typename... Args>
bool check(int a, Args... args) {
return (0 <= a && a < 16) && check(args...);
}
int main() {
cout << check(1, 12, 17) << endl;
cout << check(3) << endl;
cout << check(-1, 4) << endl;
cout << check(1, 12, 8, 2) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpib29sIGNoZWNrKGludCBhKSB7CiAgcmV0dXJuIDAgPD0gYSAmJiBhIDwgMTY7Cn0KCnRlbXBsYXRlPHR5cGVuYW1lLi4uIEFyZ3M+CmJvb2wgY2hlY2soaW50IGEsIEFyZ3MuLi4gYXJncykgewogIHJldHVybiAoMCA8PSBhICYmIGEgPCAxNikgJiYgY2hlY2soYXJncy4uLik7Cn0KCmludCBtYWluKCkgewoJY291dCA8PCBjaGVjaygxLCAxMiwgMTcpIDw8IGVuZGw7Cgljb3V0IDw8IGNoZWNrKDMpIDw8IGVuZGw7Cgljb3V0IDw8IGNoZWNrKC0xLCA0KSA8PCBlbmRsOwoJY291dCA8PCBjaGVjaygxLCAxMiwgOCwgMikgPDwgZW5kbDsKCXJldHVybiAwOwp9