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