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