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