#include <bits/stdc++.h>
using namespace std;
bool pass (long long n, long long k, unsigned long long& H) {
unsigned long long tmp= pow(2, n-1);
if (H<tmp) return 0;
H=H-tmp+k;
return 1;
}
bool solve (int t, unsigned long long& H) {
while (t--) {
long long n, k; cin >> n >> k;
if (!pass(n, k, H)) return 0;
}
return 1;
}
int main () {
int t;
unsigned long long H;
cin >> t >> H;
if (solve(t, H)) cout << "hehe";
else cout << "huhu";
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpib29sIHBhc3MgKGxvbmcgbG9uZyBuLCBsb25nIGxvbmcgaywgdW5zaWduZWQgbG9uZyBsb25nJiBIKSB7Cgl1bnNpZ25lZCBsb25nIGxvbmcgdG1wPSBwb3coMiwgbi0xKTsKCWlmIChIPHRtcCkgcmV0dXJuIDA7CglIPUgtdG1wK2s7CglyZXR1cm4gMTsKfQoKYm9vbCBzb2x2ZSAoaW50IHQsIHVuc2lnbmVkIGxvbmcgbG9uZyYgSCkgewoJd2hpbGUgKHQtLSkgewoJCWxvbmcgbG9uZyBuLCBrOyBjaW4gPj4gbiA+PiBrOwoJCWlmICghcGFzcyhuLCBrLCBIKSkgcmV0dXJuIDA7Cgl9CglyZXR1cm4gMTsKfQoKaW50IG1haW4gKCkgewoJaW50IHQ7Cgl1bnNpZ25lZCBsb25nIGxvbmcgSDsKCWNpbiA+PiB0ID4+IEg7CglpZiAoc29sdmUodCwgSCkpIGNvdXQgPDwgImhlaGUiOwoJZWxzZSBjb3V0IDw8ICJodWh1IjsKfQ==