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