#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
}
long long N = 1000000007;
long long lmax = LONG_LONG_MAX;
long long lmin = LONG_LONG_MIN;
long long factorial(long long i) {
  long long product = 1;
  for (long long j = i; j > 0; j--) {
    product *= j;
  }
  return product;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, long long p) { return power(n, p - 2, p); }
vector<long long> SieveOfEratosthenes(long long n) {
  vector<long long> soe;
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++) {
    if (prime[p]) {
      soe.push_back(p);
    }
  }
  return soe;
}
bool isPrime(long long n) {
  for (long long i = 2; i < pow(n, 0.5) + 1; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first > b.first);
}
long long nod(long long n) {
  string s = to_string(n);
  return s.length();
}
void solve() {
  long long a;
  cin >> a;
  long long b;
  cin >> b;
  if (2 * a > b) {
    cout << "-1 -1" << endl;
    return;
  }
  cout << a << " " << 2 * a << endl;
}
int32_t main() {
  fastio();
  long long t = 1;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
