#include <bits/stdc++.h>
using namespace std;
std::ostream& operator<<(std::ostream& os, pair<int, int> p) {
  os << p.first << ", " << p.second;
  return os;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long int l, r;
    cin >> l >> r;
    if (l * 2 > r) {
      cout << -1 << " " << -1 << "\n";
      continue;
    } else {
      cout << l << " " << 2 * l << "\n";
    }
  }
  return 0;
}
