#include <bits/stdc++.h>
using namespace std;
inline void prankami() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  prankami();
  int t;
  cin >> t;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    if (a * 2 > b)
      cout << -1 << " " << -1 << endl;
    else
      cout << a << " " << a * 2 << endl;
  }
}
