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