#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (x == 0) {
    return y;
  }
  return gcd(y % x, x);
}
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
void solve() {
  long long l, r;
  cin >> l >> r;
  if (r < l * 2) {
    cout << -1 << " " << -1;
    return;
  } else {
    long long lc = l * 2;
    if (lc >= l && lc <= r) {
      cout << l << " " << (l * 2);
      return;
    }
  }
  cout << -1 << " " << -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
