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