#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long n, m, a, i, b, j, k, t, x, y, z, tc, u, v, w;
  cin >> tc;
  while (tc--) {
    cin >> a >> b;
    if (b % a == 0)
      cout << a << " " << b << endl;
    else if (a * 2 <= b)
      cout << a << " " << 2 * a << endl;
    else
      cout << -1 << " " << -1 << endl;
  }
}
