#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int p, r, p1, r1, s1, c, d, x, y, l = 0, s, num, k, i, j, m, mi, ma,
                                              t, z, count = 0, count1 = 0;
  long long int n;
  cin >> t;
  for (j = 0; j < t; j++) {
    cin >> n >> m;
    if (m >= 2 * n) {
      cout << n << " " << 2 * n;
    } else
      cout << "-1 -1";
    cout << endl;
  }
}
