#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  if (b == 1) return a;
  if (b == 0) return 1;
  long long temp = power(a, b / 2);
  long long ans = temp * temp;
  if (b & 1) ans *= a;
  return ans;
}
long long power(long long a, long long b, long long p) {
  a = a % p;
  if (b == 1) return a;
  if (b == 0) return 1;
  long long temp = power(a, b / 2, p);
  long long ans = (temp * temp) % p;
  if (b & 1) ans = (a * ans) % p;
  return ans % p;
}
long long inv(long long a, long long m) { return power(a, m - 2, m); }
void solve() {
  long long l, r;
  cin >> l >> r;
  long long d = r / l;
  if (d == 1) {
    cout << -1 << " " << -1 << '\n';
    return;
  }
  cout << l << " " << d * l << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
