#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
long long i, j;
long long const size = 1e5;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long modd(string num, long long a) {
  int res = 0;
  for (int i = 0; i < num.length(); i++)
    res = (res * 10 + (int)num[i] - '0') % a;
  return res;
}
int check_xor(int n) {
  if ((n % 4) == 0)
    return n;
  else if ((n % 4) == 1)
    return 1;
  else if ((n % 4) == 2)
    return n + 1;
  else
    return 0;
}
vector<long long> sieve(long long n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  long long range = sqrt(n);
  for (i = 2; i <= range; i++) {
    if (prime[i]) {
      for (j = i * 2; j <= n; j = j + i) {
        prime[j] = false;
      }
    }
  }
  vector<long long> ans;
  for (i = 0; i < n; i++) {
    if (prime[i]) ans.push_back(i);
  }
  return ans;
}
bool iszero(long long n) { return n == 0; }
vector<long long> sieve_range(long long s, long long e) {
  vector<long long> v1 = sieve(s);
  vector<long long> v2 = sieve(e);
  vector<long long> ans(e - s);
  set_difference(v2.begin(), v2.end(), v1.begin(), v1.end(), ans.begin());
  auto it = remove_if(ans.begin(), ans.end(), iszero);
  ans.resize(it - ans.begin());
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    if (n * 2 <= m)
      cout << n << " " << 2 * n << '\n';
    else
      cout << -1 << " " << -1 << '\n';
  }
}
