// compile: g++ -o data data.cpp -O3 -std=gnu++20 -Wall -Wextra -Wshadow -D_GLIBCXX_ASSERTIONS -ggdb3 -fmax-errors=2 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#include <debug/codeforces.h>
#define debug(x...) {_variables(#x);_print(x);}
#else
#define debug(x...)
#endif
template<typename...Args> void print_(Args...args){((cout<<args<<" "),...)<<endl;}
#define rep(i,a,b) for(int i=(a);i<(int)(b);++i)
#define sz(v) ((int)(v).size())
#define print(...) print_(__VA_ARGS__);
#define INTMAX (int)(9223372036854775807)
#define INTINF (int)(1152921504606846976)
#define int long long
#define MAXN 200010
#define MAXM 10000010
// bool valid[MAXM];
// void dfs(int k) {
// if (valid[k]) return;
// valid[k] = 1;
// if (k % 3) return;
// dfs(k / 3);
// dfs(2*k / 3);
// }
int pow3[32];
int32_t main() {
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
pow3[0] = 1;
rep(i, 1, 32) pow3[i] = pow3[i-1] * 3;
int _; cin >> _;
while (_--) {
int n, m; cin >> n >> m;
bool valid = 0;
for (int i = 0; i <= 30; ++i) {
for (int j = 0; j <= i; ++j) {
if (n*(1<<j) % pow3[i] == 0 && n*(1<<j)/pow3[i] == m) {
valid = 1;
break;
}
}
if (valid) break;
}
cout << (valid ? "YES" : "NO") << endl;
}
return 0;
}
Curious about 123win94. Hoping to finding some fun and maybe even winning something! Well, here is hoping! Give it a shot yourself: 123win94
Alright, betvn1vip, let’s see what you got! Gave it a whirl, and it’s not bad, not bad at all. Good selection. Could use a little something extra, but overall, I’m feeling it. You might dig it too! betvn1vip
KG77casino… Never heard of it before, but I gave it a try. Honestly, pleasantly surprised! Good game variety, and the bonuses seem pretty competitive. I’m digging it! Check them out. kg77casino
Taizowin, never heard of it before. Anyone got an invite code they wanna throw my way? Always down to check out a new platform. taizowin
Looking for some reliable bookies. Tic88bet good for sports betting? Lots of asian handicaps? Let me know if anyone’s used them successfully for football wagers. tic88bet
Hey, people! Looking for a new gambling spot? 5699win might be your game. I found it the other day by some random forum. Check it out here: 5699win