#include <bits/stdc++.h>
using namespace std;
void solve(long long int l, long long int r) {
  for (long long int i = l; i <= r / 2; i++) {
    if (i * 2 <= r) {
      cout << i << " " << 2 * i << endl;
      return;
    }
  }
  cout << "-1 -1\n";
  return;
}
int main() {
  long long int tt;
  cin >> tt;
  while (tt--) {
    long long int l, r;
    cin >> l >> r;
    solve(l, r);
  }
}
