#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
const int n = 1e5;
vector<int> d(n, 1);
vector<int> p;
int check(int x, int l, int r) {
  if (x == 1) return 0;
  for (int i = 0; (long long)(p[i] * p[i]) < x; i++) {
    if (x % p[i] == 0 && p[i] <= r && p[i] >= l && x % p[i] >= l &&
        x % p[i] <= r) {
      return p[i];
    }
  }
  return 0;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int l, r;
    cin >> l >> r;
    if (2 * l > r)
      cout << -1 << " " << -1 << "\n";
    else
      cout << l << " " << 2 * l << "\n";
  }
}
