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