#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
void print(T1 a[], T2 n) {
  for (T2 i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
template <class T1, class T2>
void print(vector<T1> a, T2 n) {
  for (T2 i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
long long int modexpo(long long int a, long long int b, long long int m) {
  if (b == 0) {
    return 1;
  } else if (a == 1) {
    return 1;
  }
  if (b % 2 == 0) {
    long long int t = modexpo(a, b / 2, m);
    t = (t * t) % m;
    return t;
  } else {
    long long int t = modexpo(a, b / 2, m);
    t = (t * t) % m;
    t = (t * a) % m;
    return t;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test;
  cin >> test;
  while (test--) {
    int n, m;
    cin >> n >> m;
    if (2 * n <= m)
      cout << n << " " << 2 * n << endl;
    else
      cout << -1 << " " << -1 << endl;
  }
}
