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