#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long x, y;
    cin >> x >> y;
    if (y / x >= 2) {
      cout << x << " " << 2 * x;
      cout << "\n";
    } else {
      cout << -1 << ' ' << -1;
      cout << "\n";
    }
  }
}
