#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s, p, k, t, m, x, y, l, ans;
  set<int> S;
  cin >> t;
  while (t--) {
    cin >> x >> y;
    if (x * 2 > y)
      cout << "-1 -1" << endl;
    else
      cout << x << " " << x * 2 << endl;
  }
  return 0;
}
