#include <bits/stdc++.h>
using namespace std;
int t, n, k, l, r;
int a[110000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  while (t--) {
    cin >> l >> r;
    if (l * 2 > r) {
      cout << "-1 -1\n";
      continue;
    }
    cout << l << " " << l * 2 << '\n';
  }
  return 0;
}
