#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int main() {
  long long int test;
  cin >> test;
  while (test--) {
    long long int l, r;
    cin >> l >> r;
    if (l * 2 <= r)
      cout << l << " " << (l)*2 << "\n";
    else
      cout << "-1 -1\n";
  }
}
