#include <bits/stdc++.h>
using namespace std;
long long int c, r, d, e, f, g, h, i, j, k, l, m, n, o, p, q, t, x, y, z;
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
  cin >> t;
  while (t--) {
    cin >> l >> r;
    if (2 * l <= r)
      cout << l << ' ' << 2 * l << endl;
    else
      cout << -1 << ' ' << -1 << endl;
  }
}
