#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
const double Pi = acos(-1.0);
const long long INF = 1e12;
const int G = 3, Gi = 332748118;
long long qpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    if (y >= 2 * x)
      printf("%lld %lld\n", x, 2 * x);
    else
      printf("-1 -1\n");
  }
  return 0;
}
