#include <bits/stdc++.h>
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <class T>
using max_heap = priority_queue<T>;
const int mod = 998244353;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
struct PairHash {
  template <typename T1, typename T2>
  std::size_t operator()(const pair<T1, T2> &p) const {
    return hash<T1>()(p.first) ^ hash<T2>()(p.second);
  }
};
void solve(int ncase) {
  int l, r;
  scanf("%d%d", &l, &r);
  if (l == 1) {
    printf("%d %d\n", l, r);
    return;
  }
  if (l * 2 <= r) {
    printf("%d %d\n", l, 2 * l);
    return;
  }
  puts("-1 -1");
}
void solve_all_cases() {
  int T = 1;
  scanf("%d", &T);
  int ncase = 0;
  while (T--) {
    solve(++ncase);
  }
}
int main() {
  cout << std::fixed;
  cout << setprecision(9);
  solve_all_cases();
}
