#ifndef ONLINE_JUDGE #define _GLIBCXX_DEBUG #endif #include using namespace std; #define pass (void)0 #define INF (1<<30)-1 #define INFLL (1LL<<60)-1 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n) - 1; i >= 0; i--) #define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define repr2(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); i--) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) ((int)(x).size()) #define YesNo(cond) cout << ((cond) ? "Yes\n" : "No\n") #define YESNO(cond) cout << ((cond) ? "YES\n" : "NO\n") using ll = long long; using pii = pair; using pll = pair; using vi = vector; using vl = vector; using vvi = vector; using vvl = vector; template void print(const T& value) { cout << value << "\n"; } template void print(const vector& vec) { for (auto& v : vec) cout << v << " "; cout << "\n"; } template void input(vector& vec) { for (auto& v : vec) cin >> v; }; template bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; } template bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; } #include using namespace atcoder; using mint = modint998244353; using vm = vector; vector divisor(long long n, ll L, ll R) { vector ans; for (long long i = 1; i * i <= n; i++) { if (n % i == 0) { if (L <= i && i <= R) ans.push_back(i); if (i * i != n) { if (L <= n/i && n/i <= R) ans.push_back(n / i); } } } sort(all(ans)); return ans; } vector> factorization(long long n) { vector> res; long long temp = n; // 上限は ceil(sqrt(n)) for (long long i = 2; i * i <= temp; i++) { if (temp % i == 0) { long long cnt = 0; while (temp % i == 0) { temp /= i; cnt++; } res.push_back({i, cnt}); } } if (temp != 1) { res.push_back({temp, 1}); } if (res.empty()) { res.push_back({n, 1}); } return res; } pll func(ll base, vl& dp2, vl& div, vl& B) { ll a, b; ll idx; rep (i, sz(div)) { ll d = div[i]; if (dp2[base^B[i]] != 0) { a = d; idx = i; break; } } rep (i, sz(div)) { ll d = div[i]; if ((B[idx]|B[i]) == base) { b = d; break; } } return {a, b}; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(10); int T; cin >> T; while (T--) { ll N, L, R; cin >> N >> L >> R; if (N == 1) { print(-1); continue; } auto div = divisor(N, L, R); if (sz(div) < 3) { print(-1); continue; } if (R == N) { print(format("{} {} {}", div[sz(div)-3], div[sz(div)-2], div[sz(div)-1])); continue; } auto fact = factorization(N); ll size = sz(fact); vl dp(1<