#include <bits/stdc++.h>
using namespace std;
set<long long int>::iterator it;
long long int mod = 1000000007;
long long int power(long long int a, long long int b) {
  long long int p = 1;
  a = a % mod;
  while (b > 0) {
    if (b % 2 == 1) p = ((p % mod) * (a % mod)) % mod;
    b = b >> 1;
    a = ((a % mod) * (a % mod)) % mod;
  }
  return p;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k, n, t;
  cin >> t;
  while (t--) {
    long long int l, r;
    cin >> l >> r;
    if (r < 2 * l)
      cout << -1 << " " << -1 << endl;
    else
      cout << l << " " << 2 * l << endl;
  }
  return 0;
}
