#include <bits/stdc++.h>
using namespace std;
template <typename T>
void inpos(T &x) {
  x = 0;
  register T c = getchar();
  while (((c < 48) || (c > 57)) && (c != '-')) c = getchar();
  bool neg = 0;
  if (c == '-') neg = 1;
  for (; c < 48 || c > 57; c = getchar())
    ;
  for (; c > 47 && c < 58; c = getchar()) x = (x << 3) + (x << 1) + (c & 15);
  if (neg) x = -x;
}
template <typename T>
void outpos(T n) {
  if (n < 0) {
    putchar('-');
    n *= -1;
  }
  char snum[65];
  long long i = 0;
  do {
    snum[i++] = n % 10 + '0';
    n /= 10;
  } while (n);
  i = i - 1;
  while (i >= 0) putchar(snum[i--]);
}
inline void instr(char *str) {
  register char c = 0;
  register long long i = 0;
  while (c < 33) c = getchar();
  while (c != '\n' && c != ' ' && c != EOF) {
    str[i] = c;
    c = getchar();
    ++i;
  }
  str[i] = '\0';
}
template <typename T, typename TT>
inline void inpos(T &n, TT &m) {
  inpos(n);
  inpos(m);
}
template <typename T, typename TT, typename TTT>
inline void inpos(T &n, TT &m, TTT &o) {
  inpos(n, m);
  inpos(o);
}
template <typename T, typename TT, typename TTT, typename TTTT>
inline void inpos(T &n, TT &m, TTT &o, TTTT &p) {
  inpos(n, m);
  inpos(o, p);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long x, y;
    cin >> x >> y;
    if (2 * x <= y) {
      cout << x << " " << 2 * x << '\n';
    } else {
      cout << -1 << " " << -1 << '\n';
    }
  }
}
