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