#include <bits/stdc++.h>
using namespace std;
long long Power(long long n, long long x, long long mod) {
  long long ans = 1;
  while (x > 0) {
    if (x & 1) ans = (ans * n) % mod;
    n = (n * n) % mod;
    x = x >> 1;
  }
  return ans;
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long getSum(long long n) {
  long long sum = 0;
  while (n != 0) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
void q1();
void q2();
void q3();
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long test_case;
  cin >> test_case;
  while (test_case--) {
    q1();
  }
  return 0;
}
void q1() {
  long long l, r;
  cin >> l >> r;
  if (r < 2 * l) {
    cout << -1 << " " << -1 << "\n";
  } else {
    cout << l << " " << 2 * l << "\n";
  }
}
