#include <bits/stdc++.h>
using namespace std;
const long long N = 500010;
inline long long read() {
  long long s = 0, w = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch - '0'), ch = getchar();
  return s * w;
}
void print(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
signed main() {
  for (register long long T = read(); T; T--) {
    long long x, y;
    x = read(), y = read();
    if (x * 2 > y)
      puts("-1 -1");
    else
      printf("%lld %lld\n", x, x * 2);
  }
  return 0;
}
