#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, greater<long long> > q;
int main() {
  long long n;
  while (cin >> n) {
    for (long long i = 1; i <= n; i++) {
      long long x, y;
      cin >> x >> y;
      if (2 * x <= y)
        cout << x << " " << x * 2 << endl;
      else
        cout << -1 << " " << -1 << endl;
    }
  }
}
