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