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