#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
void read(T &x) {
  int q = 1;
  char ch;
  x = 0;
  for (ch = getchar(); (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
    ;
  if (ch == '-') ch = getchar(), q = -1;
  for (; '0' <= ch && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  x *= q;
}
template <class T>
void write(T x) {
  if (x < 0)
    putchar('-'), write(-x);
  else if (x < 10)
    putchar(x + '0');
  else
    write(x / 10), putchar(x % 10 + '0');
}
void dbg() { cerr << '\n'; }
template <typename H, typename... T>
void dbg(H h, T... t) {
  cerr << ' ' << h;
  dbg(t...);
}
void absinthe() {
  int l, r;
  cin >> l >> r;
  if (l * 2 > r)
    cout << -1 << " " << -1 << '\n';
  else
    cout << l << " " << l * 2 << '\n';
}
int main() {
  int Tx = 1;
  ios_base::sync_with_stdio(0), cin.tie(NULL);
  cin >> Tx;
  while (Tx--) absinthe();
}
