#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmax(T &x, T &y) {
  if (x < y) swap(x, y);
}
template <class T>
inline void chmin(T &x, T &y) {
  if (x > y) swap(x, y);
}
const long long INF = 0x3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const long double EPS = 10e-10;
void Solution() {
  long long l, r;
  scanf("%lld %lld", &l, &r);
  if (l * 2 <= r)
    printf("%lld %lld\n", l, l * 2);
  else
    printf("-1 -1\n");
}
int32_t main() {
  long long tc = 1;
  scanf("%lld", &tc);
  for (long long tn = 1; tn < tc + 1; tn += 1) {
    Solution();
  }
  return 0;
}
