#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, j;
  cin >> t;
  for (j = 1; j <= t; j++) {
    int l, r;
    cin >> l >> r;
    if ((l * 2) <= r) {
      cout << l << " " << l * 2 << endl;
    } else {
      cout << "-1 -1" << endl;
    }
  }
}
