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