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