#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vd = vector<double>;
vi dir = {-1, 0, 1, 0, -1, -1, 1, 1, -1};
int main() {
  ll test;
  cin >> test;
  for (ll _ = 0, __len = (test); _ < __len; ++_) {
    ll l, r;
    cin >> l >> r;
    ll y = l * 2;
    if (y > r) {
      l = -1;
      y = -1;
    }
    cout << l << ' ' << y << '\n';
  }
}
