#include <bits/stdc++.h>
using namespace std;
long long m = 1e9 + 7;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b;
    cin >> a >> b;
    if (b < (2 * a)) {
      cout << "-1 -1" << endl;
    } else {
      cout << a << " " << 2 * a << endl;
    }
  }
}
