#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int OO = INT_MAX, P = 10000;
int xd[] = {1, 0, -1, 0, -1, 1, 1, -1};
int yd[] = {0, -1, 0, 1, 1, 1, -1, -1};
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  long long int t;
  cin >> t;
  while (t--) {
    long long int l, r;
    cin >> l >> r;
    if (l * 2 > r)
      cout << -1 << " " << -1 << '\n';
    else
      cout << l << " " << 2 * l << '\n';
  }
  return 0;
}
