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