#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll t;
  t = 1;
  cin >> t;
  while (t--) {
    ll l, r;
    cin >> l >> r;
    if (l == r)
      cout << "-1 -1"
           << "\n";
    else if (r >= 2 * l)
      cout << l << " " << 2 * l;
    else
      cout << "-1 -1"
           << "\n";
    cout << "\n";
  }
}
