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