#include <bits/stdc++.h>
using namespace std;
void LCM(long long int x, long long int y, long long int l, long long int r) {
  long long int flag = 0;
  long long int x1 = x, y1 = y;
  if (2 * l > r)
    cout << "-1 -1" << endl;
  else
    cout << l << " " << 2 * l << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int l, r;
    cin >> l >> r;
    long long int x = l, y = r;
    LCM(x, y, l, r);
  }
}
