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