#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
void solve() {
  int a, b;
  cin >> a >> b;
  if (a * 2 <= b)
    cout << a << ' ' << a * 2 << "\n";
  else
    cout << "-1 -1\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) solve();
}
