#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t, i, j, r, k, x, y, n, m, l, a, b, c, d = 0;
  cin >> t;
  string s, cm = "abacaba";
  while (t--) {
    cin >> l >> r;
    if (2 * l <= r) {
      cout << l << " " << 2 * l << "\n";
    } else
      cout << "-1 -1\n";
  }
  return 0;
}
