Let $LCM(x, y)$ be the minimum positive integer that is divisible by both $x$ and $y$. For example, $LCM(13, 37) = 481$, $LCM(9, 6) = 18$.

You are given two integers $l$ and $r$. Find two integers $x$ and $y$ such that $l \le x < y \le r$ and $l \le LCM(x, y) \le r$.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 10000$) — the number of test cases.

Each test case is represented by one line containing two integers $l$ and $r$ ($1 \le l < r \le 10^9$).


-----Output-----

For each test case, print two integers:

  if it is impossible to find integers $x$ and $y$ meeting the constraints in the statement, print two integers equal to $-1$;  otherwise, print the values of $x$ and $y$ (if there are multiple valid answers, you may print any of them). 


-----Example-----
Input
4
1 1337
13 69
2 4
88 89

Output
6 7
14 21
2 4
-1 -1

Difficulty: EASY

Solutions:
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import heapq
from collections import Counter
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if 2 * n <= k:
		print(n, 2 * n)
	else:
		print(-1, -1)


from sys import stdin, stdout

def input():
	return stdin.readline().strip()
T = int(input())
for _ in range(T):
	(l, r) = input().split(' ')
	l = int(l)
	r = int(r)
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(l, r) = map(lambda x: int(x), input().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if 2 * x <= y:
		print(x, end=' ')
		print(2 * x)
	else:
		print(-1, end=' ')
		print(-1)


import os
import operator
import sys
import bisect
import _operator
from _collections import defaultdict
from io import BytesIO, IOBase

def inar():
	return [int(k) for k in input().split()]

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def main():
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		if l * 2 <= r:
			print(l, l * 2)
		else:
			print(-1, -1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


test_cases = int(input())
final = []
for i in range(test_cases):
	li = [int(x) for x in input().split()]
	l = li[0]
	r = li[1]
	if 2 * l < r + 1:
		final.append([l, 2 * l])
	else:
		final.append([-1, -1])
for i in range(len(final)):
	print(*final[i])


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('../output.txt', 'w')
except:
	pass
for _ in range(int(input())):
	(l, r) = L()
	if r // l >= 2:
		print(l, l * 2)
	else:
		print(-1, -1)


t = int(input())
while t != 0:
	(l, r) = map(int, input().split())
	if l + l <= r:
		print(l, l + l)
	else:
		print('-1 -1')
	t -= 1


t = int(input())
while t > 0:
	(l, r) = [int(x) for x in input().split()]
	if r < 2 * l:
		print('-1 -1')
	else:
		print(l, 2 * l)
	t -= 1


import math
t = int(input())
for q in range(0, t):
	(a, b) = map(int, input().split())
	p = a * 2
	if p <= b:
		print(a, p)
	else:
		print(-1, -1)


t = int(input())
for _ in range(t):
	m = list(map(int, input().split()))
	(l, r) = (m[0], m[1])
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
for i in range(int(input())):
	temp = 0
	arr = list(map(int, input().split()))
	if arr[0] * 2 >= arr[0] and arr[0] * 2 <= arr[1]:
		print(arr[0], end=' ')
		print(arr[0] * 2)
	else:
		print('-1 -1')


query = int(input())
for i in range(query):
	ab = list(map(int, input().split()))
	a = ab[0]
	b = ab[1]
	if b < 2 * a:
		print('-1 -1')
	else:
		print(a, 2 * a)


tt = int(input())
for loop in range(tt):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split(' '))
	if l % 2 == 0:
		m = l // 2
	else:
		m = (l + 1) // 2
	if m == l:
		if m * 2 <= r:
			print(m, m * 2)
		else:
			print(-1, -1)
	elif l * 2 <= r:
		print(l, l * 2)
	elif m * 6 <= r:
		print(m * 2, m * 3)
	elif m * 4 <= r:
		print(m * 2, m * 4)
	else:
		print(-1, -1)


t = int(input())
for ti in range(0, t):
	(a, b) = map(int, input().split())
	a0 = -1
	a1 = -1
	if 2 * a > b:
		print(-1, -1)
	else:
		print(a, 2 * a)


t = int(input())
for each in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = x * 2
	if y > r:
		x = -1
		y = -1
	print(x, y)


for _ in range(int(input())):
	lr = list(map(int, input().split()))
	l = lr[0]
	r = lr[1]
	x = l
	y = 2 * l
	if y > r:
		print(-1, -1)
	else:
		print(x, y)


from math import *
n = int(input())
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] > x[1] / 2:
		print(-1, -1)
	else:
		print(x[0], 2 * x[0])


t = int(input())
for i in range(t):
	lr = list(map(int, input().rstrip().split()))
	l = lr[0]
	r = lr[1]
	if 2 * l <= r:
		print('{} {}'.format(l, 2 * l))
	else:
		print('{} {}'.format(-1, -1))


def iip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def lip():
	return list(map(int, input().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst
t = iip()
while t:
	t -= 1
	(a, b) = mip()
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


t = int(input())
while t:
	(l, r) = input().split(' ')
	l = int(l)
	r = int(r)
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
	t = t - 1


t = int(input())

def nok(x, y):
	while x != 0 and y != 0:
		if x > y:
			x = x % y
		else:
			y = y % x
	return x * y // max(x, y)
for _ in range(t):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
t = int(sys.stdin.readline())
for i in range(t):
	(l, r) = map(int, sys.stdin.readline().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if b < a * 2:
		print(-1, -1)
	else:
		print(a, a * 2)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(m,) = I()
while m:
	(a, b) = I()
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)
	m -= 1


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	if n * 2 <= k:
		print(n, 2 * n)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
p = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


test = int(input())

def solve():
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
for x in range(test):
	solve()


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		stdout.write(str(l) + ' ' + str(2 * l))
	else:
		stdout.write('-1 -1')
	stdout.write('\n')


n = int(input())
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	if 2 * a > b:
		print(-1, -1)
	else:
		print(a, 2 * a)


def LCM(l, r):
	if r >= 2 * l:
		return [str(l), str(2 * l)]
	else:
		return ['-1', '-1']
t = int(input())
natija = []
for i in range(t):
	(l, r) = input().split(' ')
	(l, r) = (int(l), int(r))
	natija.append(LCM(l, r))
for i in range(t):
	print(' '.join(natija[i]))


T = int(input())
for t in range(T):
	(l, r) = map(int, input().split())
	if r / l < 2:
		print('-1 -1')
	else:
		print(str(l) + ' ' + str(l * 2))


def sol(l, r):
	x = l
	y = 2 * l
	if y > r:
		print(-1, -1)
		return
	print(x, y)
	return
k = int(input())
for i in range(k):
	(l, r) = list(map(int, input().split(' ')))
	sol(l, r)


t = int(input())
for x in range(t):
	z = list(input().split(' '))
	n = int(z[0])
	m = int(z[1])
	x = min(n, m)
	y = 2 * x
	if y <= max(m, n):
		print(x, y)
	else:
		print(-1, -1)


import sys
for b in range(0, int(sys.stdin.readline())):
	lr = list(map(int, sys.stdin.readline().split()))
	if lr[1] < 2 * lr[0]:
		sys.stdout.write('-1 -1\n')
	else:
		sys.stdout.write(str(lr[0]) + ' ' + str(2 * lr[0]) + '\n')


def lcm_solve(l, r):
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)

def main():
	test_case = int(input())
	while test_case != 0:
		(l, r) = map(int, input().split(' '))
		lcm_solve(l, r)
		test_case = test_case - 1
main()


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		(l, r) = In()
		if l * 2 <= r:
			print(l, l * 2)
		else:
			print(-1, -1)
main()


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	(l, r) = list(map(int, stdin.readline().rstrip().split()))
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


n = int(input())
while n > 0:
	x = list(map(int, input().split()))
	if x[0] * 2 > x[1]:
		print('-1 -1')
	else:
		print(x[0], x[0] * 2)
	n -= 1


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def Ra():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class UnionFind:

	def __init__(self, n):
		self.table = [-1] * n

	def _root(self, x):
		if self.table[x] < 0:
			return x
		else:
			self.table[x] = self._root(self.table[x])
			return self.table[x]

	def find(self, x, y):
		return self._root(x) == self._root(y)

	def union(self, x, y):
		r1 = self._root(x)
		r2 = self._root(y)
		if r1 == r2:
			return
		d1 = self.table[r1]
		d2 = self.table[r2]
		if d1 <= d2:
			self.table[r2] = r1
			if d1 == d2:
				self.table[r1] -= 1
		else:
			self.table[r1] = r2

	def __str__(self):
		rt = [i if j < 0 else j for (i, j) in enumerate(self.table)]
		return str(rt)
show_flg = False
show_flg = True
ans = 0
t = I()
for _ in range(t):
	(a, b) = LI()
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	x = l
	k = r // x
	if k > 1:
		print(x, 2 * x)
	else:
		print(-1, -1)


def ans(l, r):
	if l * 2 > r:
		print(-1, -1)
		return
	print(l, l * 2)
	return
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	ans(l, r)


t = int(input())
for i in range(0, t):
	(x, y) = map(int, input().split())
	if x * 2 <= y:
		print(x, x * 2)
	else:
		print(-1, -1)


from sys import stdout
from sys import stdin

def get():
	return stdin.readline().strip()

def getf():
	return [int(i) for i in get().split()]

def put(a, end='\n'):
	stdout.write(str(a) + end)

def putf(a, sep=' ', end='\n'):
	stdout.write(sep.join(map(str, a)) + end)

def pin():
	res = ''
	a = stdin.read(1)
	while a not in {' ', '\n'}:
		res += a
		a = stdin.read(1)
	return res

def solve(l, r):
	a = l
	b = l * 2
	if b <= r:
		return [a, b]
	return [-1, -1]

def main():
	t = int(pin())
	for i in range(t):
		(a, b) = getf()
		putf(solve(a, b))
main()


from sys import stdin
t = int(stdin.readline().strip())
for _ in range(t):
	(l, r) = list(map(int, stdin.readline().strip().split(' ')))
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(left, right) = tuple(map(int, input().split()))
	if left * 2 <= right:
		print(left, left * 2)
	else:
		print(-1, -1)


n = int(input())
import math

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
while n > 0:
	ans = (-1, -1)
	(l, r) = tuple((int(x) for x in input().split()))
	for i in range(l, r + 1):
		if i * 2 > r:
			break
		for j in range(2, math.floor(r / i) + 1):
			if l <= i * j <= r:
				ans = (i, i * j)
				break
			if i * j > r:
				break
		if ans != (-1, -1):
			break
	print(*ans)
	n -= 1


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	print((r >= 2 * l) * f'{l} {l * 2}' + (r < 2 * l) * '-1 -1')


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(a, b):
	console('----- solving ------')
	console(a, b)
	if 2 * a > b:
		return '{} {}'.format(-1, -1)
	return '{} {}'.format(a, 2 * a)

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	(a, b) = list(map(int, input().split()))
	res = solve(a, b)
	print(res)


for test in range(int(input())):
	(l, r) = map(int, input().strip().split(' '))
	flag = 0
	for i in range(l, r + 1):
		if i * 2 <= r:
			print(i, i * 2)
			flag = 1
			break
		else:
			break
	if flag == 0:
		print(-1, -1)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		(l, r) = ria()
		if 2 * l > r:
			print(-1, -1)
			continue
		print(l, 2 * l)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


rep = int(input())
for i in range(rep):
	x = 0
	y = 0
	rl = list(map(int, input().split(' ')))
	l = rl[0]
	r = rl[1]
	if l * 2 <= r:
		x = l
		y = l * 2
	else:
		x = -1
		y = -1
	print(x, y)


def solve(l, r):
	if r < 2 * l:
		return '-1 -1'
	else:
		return str(l) + ' ' + str(2 * l)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	print(solve(l, r))


def func():
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
T = int(input())
for _ in range(T):
	func()


import sys
input = sys.stdin.readline
T = int(input())
for t in range(T):
	(L, R) = [int(_) for _ in input().split()]
	if R < L * 2:
		print(-1, -1)
	else:
		print(L, L * 2)


for i in range(int(input())):
	(a, b) = [int(j) for j in input().split()]
	(a, b) = (min(a, b), max(a, b))
	if b >= a * 2:
		print(a, a * 2)
	else:
		print(-1, -1)


import sys

def solve():
	(a, b) = map(int, input().split())
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, 2 * a)
	return
for i in range(int(input())):
	solve()


def LCM():
	N = int(input())
	for i in range(N):
		arr = input().split(' ')
		arr = [int(k) for k in arr]
		(l, r) = arr
		if r / l >= 2:
			print(f'{l} {2 * l}')
		else:
			print('-1 -1')
LCM()


from math import *
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


def flcm(x, y):
	if x > y:
		greater = x
	else:
		greater = y
	while True:
		if greater % x == 0 and greater % y == 0:
			lcm = greater
			break
		greater += 1
	return lcm
t = int(input())
for test in range(t):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print('-1 -1')


for _ in range(int(input())):
	(l, r) = list(map(int, input().split()))
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


import io, os, math
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
rr = lambda : input()
rri = lambda : int(input())
rrm = lambda : list(map(int, input().split()))
INF = float('inf')

def solve(L, R):

	def lcm(a, b):
		return abs(a * b) // math.gcd(a, b)
	for a in range(L, R):
		b = 2 * a
		if b > R:
			break
		elif L <= lcm(a, b) <= R:
			print(a, b)
			return
		else:
			break
	print(-1, -1)
	return
t = rri()
for _ in range(t):
	(L, R) = rrm()
	solve(L, R)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, k, m):
	res = 1
	while k > 0:
		if k % 2 == 1:
			res = res * a % m
		a = a * a % m
		k = k // 2
	return res % m

def solution():
	(l, r) = map(int, input().split())
	if r < l * 2:
		print('-1 -1')
		return
	print(f'{l} {l * 2}')
for i in range(int(input())):
	solution()


def solve():
	(l, r) = map(int, input().split())
	if l << 1 <= r:
		print(l, l << 1)
	else:
		print('-1 -1')

def main():
	t = int(input())
	for i in range(t):
		solve()
main()


for i in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l > r and l * (l + 1) > r:
		print(-1, -1)
	elif l * (l + 1) < 2 * l:
		print(l, l + 1)
	else:
		print(l, 2 * l)


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		[l, r] = inlt()
		if 2 * l <= r:
			pr_list([l, 2 * l])
		else:
			pr_list([-1, -1])
main()


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(l, r):
	if 2 * l <= r:
		return [l, 2 * l]
	return [-1, -1]

def main():
	for _ in range(ri()):
		(l, r) = ria()
		wia(solve(l, r))
main()


import math

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


n = int(input())
for i in range(n):
	[a, b] = list(map(int, input().split()))
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


T = int(input())
for t in range(T):
	(a, b) = list(map(int, input().split()))
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)


t = int(input())
while t:
	(l, r) = map(int, input().split())
	x = l
	y = l * 2
	if y > r:
		print(-1, -1)
	else:
		print(x, y)
	t = t - 1


T = int(input())
for _ in range(T):
	(l, r) = tuple(map(int, input().split()))
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


from typing import Iterator

def get_num_input() -> Iterator[int]:
	return map(int, input().split())

def main() -> None:
	lower: int
	upper: int
	(lower, upper) = get_num_input()
	twice_lower = lower * 2
	print(*((lower, twice_lower) if twice_lower <= upper else (-1,) * 2))
ONLY_ONCE: bool = False
for _ in range(1 if ONLY_ONCE else int(input())):
	main()


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
t = int(input())
while t > 0:
	k = 0
	t -= 1
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def findXY(l, r):
	if r - l < l:
		return [-1, -1]
	return [l, 2 * l]
n = int(input())
for i in range(n):
	(l, r) = map(int, input().split())
	(x, y) = findXY(l, r)
	print(x, y)


for T in range(int(input())):
	(l, r) = map(int, input().split())
	ans = l * 2
	if ans > r:
		(ans, l) = (-1, -1)
	print(l, ans)
	pass


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	(n, m) = map(int, input().split())
	if n * 2 <= m:
		print(n, 2 * n)
	else:
		print(-1, -1)
	t -= 1


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	if m >= 2 * n:
		print(n, 2 * n)
	else:
		print(-1, -1)


for cases in range(int(input())):
	(l, r) = map(int, input().split())
	if r >= 2 * l:
		x = l
		y = 2 * l
	else:
		x = -1
		y = -1
	print(x, y)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math as m
for _ in range(ri()):
	(l, r) = ria()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
sys.setrecursionlimit(10 ** 5)

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))
print = sys.stdout.write

def solve():
	(l, r) = MI()
	if 2 * l <= r:
		print(str(l) + ' ' + str(2 * l) + '\n')
	else:
		print(str(-1) + ' ' + str(-1) + '\n')
for _ in range(II()):
	solve()


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(int(input())):
	(l, r) = list(map(int, input().split()))
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


from cmath import sqrt
import math
from collections import defaultdict, deque, Counter
from functools import reduce
from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
		continue
	else:
		print(-1, -1)


def LCM(x, y):
	num = x * y
	for i in range(max(x, y), x * y):
		if i % x == 0 and i % y == 0:
			num = i
			break
	return num
	pass
answer = list()
n = int(input())
for i in range(n):
	s = [int(i) for i in input().split()]
	(l, r) = (s[0], s[1])
	if l <= l * 2 <= r:
		answer.append([l, l * 2])
	else:
		answer.append([-1, -1])
for i in range(n):
	print(*answer[i])


t = int(input())
for i in range(t):
	(l, r) = input().replace('(', '').replace(')', '').replace(',', '').split()
	(l, r) = (int(l), int(r))
	if r < 2 * l:
		respuesta = (-1, -1)
	else:
		respuesta = (l, 2 * l)
	print(str(respuesta[0]) + ' ' + str(respuesta[1]))


t = int(input())
for i in range(t):
	l = [int(i) for i in input().split()]
	a = l[0]
	b = l[1]
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)


import sys, math
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
from collections import deque, defaultdict
from math import ceil, floor, inf, factorial, gcd, log2
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()

def lcm(a, b):
	return a * b // gcd(a, b)

def setbits(n):
	return bin(n).count('1')

def resetbits(n):
	return bin(n).count('0')

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * modinv(den, p) % p

def isPrime(num):
	if num <= 1:
		return False
	if num == 2 or n == 3:
		return True
	if num % 2 == 0 or num % 3 == 0:
		return False
	for i in range(5, int(num ** 0.5) + 1, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(arr, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if arr[mid] == val:
			return mid
		elif arr[mid] < val:
			low = mid + 1
		else:
			high = mid - 1
	return -1

def sumofdigit(num):
	count = 0
	while num:
		count += num % 10
		num //= 10
	return count

def make_dic(arr):
	freq = {}
	for val in arr:
		freq[val] = freq[val] + 1 if val in freq else 1
	return freq

def inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return mat

def prefix_sum(n, arr):
	for i in range(1, n):
		arr[i] += arr[i - 1]
	return arr

def binomial(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def divisors(n):
	res = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				res.append(i)
			else:
				res.append(i)
				res.append(n // i)
	return res
for _ in range(ii1()):
	(l, r) = iia()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def func(l, r):
	for i in range(l, int(r / 2) + 1):
		ar = 2 * i
		if ar <= r:
			return str(i) + ' ' + str(ar)
	return '-1 -1'
for i in range(int(input())):
	(l, r) = map(int, input().split())
	print(func(l, r))


t = int(input())
for _ in range(t):
	(L, R) = map(int, input().split())
	ans = str(-1) + ' ' + str(-1)
	if 2 * L <= R:
		ans = str(L) + ' ' + str(2 * L)
	print(ans)


t = int(input())
Ans = []
for i in range(t):
	(r, l) = map(int, input().split())
	if l >= 2 * r:
		ans = str(r) + ' ' + str(2 * r)
	else:
		ans = str(-1) + ' ' + str(-1)
	Ans.append(ans)
for i in Ans:
	print(i)


import sys

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))
print = sys.stdout.write

def solve():
	(l, r) = MI()
	if 2 * l <= r:
		print(str(l) + ' ' + str(2 * l) + '\n')
	else:
		print(str(-1) + ' ' + str(-1) + '\n')
for _ in range(II()):
	solve()


import os
import sys
from io import BytesIO, IOBase
profile = 0
pypy = 1

def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))

def main():
	T = iin()
	while T:
		T -= 1
		(l, r) = lin()
		(x, y) = (l, l * 2)
		if y > r:
			(x, y) = (-1, -1)
		print(x, y)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if pypy:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
if profile:
	import cProfile
	cProfile.run('main()')
else:
	main()


def main(l, r):
	x = l
	y = 2 * l
	if y <= r:
		return [x, y]
	else:
		return [-1, -1]
t = int(input())
for t_itr in range(t):
	lr = list(map(int, input().rstrip().split()))
	l = lr[0]
	r = lr[1]
	res = main(l, r)
	print(*res)


import sys
import math
mod = 10 ** 9 + 7
inf = float('inf')

def I():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)

def lcm(x, y):
	return x * y // gcd(x, y)
t = I()
for _ in range(t):
	(l, r) = LI()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys
import heapq

def main():
	t = int(input())
	for _ in range(t):
		(a, b) = map(int, sys.stdin.readline().split())
		if b < 2 * a:
			print(-1, -1)
		else:
			print(a, 2 * a)
	return
main()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(a, b) = list(map(int, input().split()))
		if 2 * a <= b:
			yield '{} {}'.format(a, 2 * a)
		else:
			yield '-1 -1'
t = int(input())
ans = gift()
print(*ans, sep='\n')


t = int(input())
for i in range(t):
	(l, r) = [int(x) for x in input().split()]
	x = l
	y = x * 2
	if y <= r:
		print('%d %d' % (x, y))
	else:
		print('%d %d' % (-1, -1))


import math
for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	d = True
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
mod = 1000000007

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def YES():
	print('YES')

def NO():
	print('NO')

def Yes():
	print('Yes')

def No():
	print('No')
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

class MergeFind:

	def __init__(self, n):
		self.parent = list(range(n))
		self.size = [1] * n
		self.num_sets = n

	def find(self, a):
		to_update = []
		while a != self.parent[a]:
			to_update.append(a)
			a = self.parent[a]
		for b in to_update:
			self.parent[b] = a
		return self.parent[a]

	def merge(self, a, b):
		a = self.find(a)
		b = self.find(b)
		if a == b:
			return
		if self.size[a] < self.size[b]:
			(a, b) = (b, a)
		self.num_sets -= 1
		self.parent[b] = a
		self.size[a] += self.size[b]

	def set_size(self, a):
		return self.size[self.find(a)]

	def __len__(self):
		return self.num_sets

def lcm(a, b):
	return abs(a // gcd(a, b) * b)

def comb(n, r):
	if n < r:
		return 0
	else:
		return fac[n] * (finv[r] * finv[n - r] % mod) % mod

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def arr1d(n, v):
	return [v] * n

def arr2d(n, m, v):
	return [[v] * m for _ in range(n)]

def arr3d(n, m, p, v):
	return [[[v] * p for _ in range(m)] for i in range(n)]

def solve():
	(l, r) = sep()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
testcase(int(inp()))


def process():
	(a, b) = list(map(int, input().split()))
	if a * 2 <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)
tests = int(input())
for i in range(tests):
	process()


import math
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	for i in range(l, r + 1 - l):
		t = i * (i + i) // math.gcd(i, i + i)
		if t >= l and t <= r:
			print(i, i + i)
			break
	else:
		print(-1, -1)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


for t in range(int(input())):
	(l, r) = [int(x) for x in input().split()]
	if 2 * l > r:
		print('-1 -1')
	else:
		print(l, 2 * l)


t = int(input())
import math
for t1 in range(0, t):
	(x, y) = map(int, input().split())
	z = x
	z1 = x * 2
	if z1 <= y:
		print(z, z1)
	else:
		print(-1, -1)


import io
import os
import sys
from collections import deque, defaultdict

def _input():
	x = sys.stdin.readline()
	x = x.replace('\r', '')
	x = x.replace('\n', '')
	return x
if 'STDINPUT' not in os.environ:
	input = _input
else:
	print('Standard input')

def solve():
	(l, r) = [int(x) for x in input().split()]
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)
test_cases = True
if test_cases:
	_q = int(input())
	for _ in range(_q):
		solve()
else:
	solve()


import sys
q = int(input())
for i in range(q):
	(n, m) = [int(j) for j in sys.stdin.readline().split()]
	if n * 2 > m:
		print(-1, -1)
	else:
		print(n, n * 2)


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
import math
for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	d = a * 2
	if d <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(l, r) = [int(x) for x in input().split()]
	if 2 * l > r:
		print(-1, -1)
		continue
	print(l, 2 * l)


for T in range(int(input())):
	(l, r) = map(int, input().split())
	first = l * 2
	if l * 2 <= r:
		print(l, first)
	else:
		print(-1, -1)


import sys
lines = []
for line in sys.stdin:
	if 'exit' == line.rstrip():
		break
	lines.append(line)
t = int(lines[0])

def lcm(x, y):
	max = x * y
	a = [0] * (max + 1)
	for i in range(0, max + 1, x):
		a[i] = 1
	for i in range(0, max + 1, y):
		a[i] += 1
		if a[i] == 2 and i != 0:
			return i
for case in range(1, t + 1):
	(l, r) = ([int(x) for x in lines[case].split(' ')][0], [int(x) for x in lines[case].split(' ')][1])
	if 2 * l <= r:
		print(str(l) + ' ' + str(2 * l))
	else:
		print('-1 -1')


def lcm(a, b):
	r = a % b
	return lcm(b, r) if r else b
t = int(input())
for k in range(t):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	(l, r) = rl()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


n = int(input())
llist = []
rlist = []
for i in range(n):
	(l, r) = map(int, input().strip().split())
	llist.append(l)
	rlist.append(r)
for i in range(n):
	if 2 * llist[i] <= rlist[i]:
		print(llist[i], 2 * llist[i])
	else:
		print(-1, -1)
exit()


import sys, random

def gcd(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a

def lcm(a, b):
	return a // gcd(a, b) * b
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	x1 = l
	x2 = x1 * 2
	if l <= x1 <= x2 <= r and l <= lcm(x1, x2) <= r:
		print(x1, x2)
	else:
		print(-1, -1)


import math
t = int(input())
result = []
for i in range(t):
	(l, r) = list(map(int, input().split(' ')))
	prime2 = []
	if (r % 2 == 1) & (r - 1 >= l):
		r -= 1
	right = r
	j = 2
	while j <= int(math.sqrt(r)):
		if r % j == 0:
			prime2.append(j)
			r = r // j
			break
		else:
			j += 1
	prime2.append(r)
	if l * prime2[0] > right:
		result.append('-1 -1')
	else:
		result.append(str(l) + ' ' + str(l * prime2[0]))
for i in result:
	print(i)


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	(a, b) = mi()
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


import sys
input = sys.stdin.buffer.readline

def solution():
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)
for _ in range(int(input())):
	solution()


for i in range(int(input())):
	line = input().split()
	l = int(line[0])
	r = int(line[1])
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


tc = int(input())
for ctr in range(tc):
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


t = int(input())
ans = []
for i in range(t):
	a = input()
	(l, r) = map(int, a.split())
	if r < 2 * l:
		ans.append(-1)
		ans.append(-1)
	else:
		ans.append(l)
		ans.append(2 * l)
(x, y) = (0, 2)
for i in range(2 * t - 1):
	print(*ans[x:y])
	(x, y) = (y, y + 2)


import math
t = int(input())
for g in range(t):
	(l, r) = list(map(int, input().split()))
	if r < 2 * l:
		print('-1', '-1')
	else:
		print(l, 2 * l)


t = int(input())
for _ in range(t):
	s = input()
	arr = [int(item) for item in s.split(' ')]
	if 2 * arr[0] > arr[1]:
		print(-1, end=' ')
		print(-1)
	else:
		print(arr[0], end=' ')
		print(2 * arr[0])


import sys
input = sys.stdin.readline

def lcm(l, r):
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)

def solution():
	arr = list(map(lambda x: int(x), input().split()))
	l = arr[0]
	r = arr[1]
	lcm(l, r)
t = int(input())
for i in range(0, t):
	solution()


t = int(input())
for i in range(t):
	(n, m) = map(int, input().split())
	if m < 2 * n and n != 1:
		print(-1, -1)
	else:
		print(n, 2 * n)


t = int(input())
while t:
	T = False
	(l, r) = map(int, input().rstrip().split())
	if r >= 2 * l:
		print(str(l) + ' ' + str(2 * l))
	else:
		print('-1 -1')
	t -= 1


import sys, math, itertools
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for w in wtf[1:]:
	(l, r) = map(int, w.split(' '))
	x = l
	y = l * 2
	z = int(abs(x * y) / math.gcd(x, y))
	while z > r or z < l:
		y *= 2
		if y > r:
			x = -1
			y = -1
			break
		z = int(abs(x * y) / math.gcd(x, y))
	print(x, y)


for i in range(int(input())):
	(l, r) = (int(x) for x in input().split())
	if 2 * l <= r:
		print(l, end=' ')
		print(2 * l)
	else:
		print('-1 -1')


import math

def go(l, r):
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split(' '))
	go(l, r)


def compute_lcm(x, y):
	if x > y:
		greater = x
	else:
		greater = y
	while True:
		if greater % x == 0 and greater % y == 0:
			lcm = greater
			break
		greater += 1
	return lcm
t = int(input())
i = 0
while i < t:
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
	i += 1


def lcm(l, r):
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
t = int(input())
for i in range(0, t):
	lr = list(map(int, input().strip().split()))
	lcm(lr[0], lr[1])


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())
t = int(input())
for i in range(t):
	(l, r) = get_ints()
	if 2 * l > r:
		print('-1', '-1')
	else:
		print(l, l * 2)


import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline
MOD = 1000000007
I = lambda : int(input())
M = lambda : map(int, input().split())
Ms = lambda : map(str, input().split())
ARR = lambda : list(map(int, input().split()))

def LCM(a, b):
	return int(a * b // mt.gcd(a, b))

def main():
	(l, r) = M()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
tc = I()
for _ in range(tc):
	main()


def solve(l, r):
	if 2 * l > r:
		return (-1, -1)
	else:
		return (l, l * 2)
for _ in range(int(input())):
	(l, r) = map(int, input().strip().split(' '))
	ans = solve(l, r)
	print(ans[0], ans[1])


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
T = inp()
for t in range(T):
	(l, r) = invr()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	c = l * l * 2 // gcd(l, 2 * l)
	if c >= l and c <= r:
		print(l, end=' ')
		print(2 * l)
	else:
		print('-1 -1')


import os
from sys import stdin, stdout

def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while a > 0:
		(a, b) = (a % b, a)
	return b

def solve(tc):
	(l, r) = map(int, stdin.readline().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
tcs = 1
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
MOD = 998244353
T = int(stdin.readline())
for _ in range(T):
	(l, r) = list(map(int, stdin.readline().split()))
	if r < 2 * l:
		print(-1, -1)
		continue
	print(l, 2 * l)


import sys, heapq
tc = int(sys.stdin.readline())
for _ in range(tc):
	(a, b) = map(int, sys.stdin.readline().split())
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)


def answer(l, r):
	flag = 0
	if 2 * l > r:
		return 0
	else:
		return 1
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	flag = answer(l, r)
	if flag == 0:
		print(*[-1, -1])
	else:
		print(*[l, 2 * l])


T = int(input())
test_cases = list()
for t in range(T):
	test_cases.append(input().split(' '))
for test_case in test_cases:
	(l, r) = (int(test_case[0]), int(test_case[1]))
	if l == 1:
		print(1, 2)
		continue
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


import sys
from collections import Counter as C
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


test = int(input())
for q in range(test):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


for _ in [*open(0)][1:]:
	(l, r) = map(int, _.split())
	if 2 * l > r:
		print('-1 -1')
	else:
		print(f'{l} {2 * l}')


t = int(input())
while t:
	t += -1
	(a, b) = map(int, input().split())
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if l << 1 <= r:
		print(l, l << 1)
	else:
		print(-1, -1)


import io
import os
from sys import stdin, stdout

def main():
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
	for t in range(int(input())):
		(l, r) = map(int, input().split())
		if 2 * l <= r:
			print(l, 2 * l)
		else:
			print(-1, -1)
main()


def f(x, y):
	if x * 2 <= y:
		return [x, 2 * x]
	return [-1, -1]
n = int(input())
ans = []
for i in range(n):
	(z, r) = map(int, input().split())
	ans += [f(z, r)]
for i in ans:
	print(i[0], i[1])


from sys import stdin

def GCD(a, b):
	return a if b == 0 else GCD(b, a % b)
for i in range(int(input())):
	(l, r) = map(int, input().split())
	if r / l < 2:
		print(-1, -1)
	else:
		print(l, l * 2)


from sys import stdin, stdout

def arrinp():
	return [*map(int, stdin.readline().split(' '))]

def mulinp():
	return map(int, stdin.readline().split(' '))

def intinp():
	return int(stdin.readline())

def inp():
	return stdin.readline()

def solution():
	(l, r) = mulinp()
	if r < 2 * l:
		print(-1, -1)
		return
	else:
		print(l, 2 * l)
		return
testcases = 1
testcases = intinp()
for _ in range(testcases):
	solution()


t = int(input())
for tt in range(t):
	(l, r) = map(int, input().strip().split())
	flag = False
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(num, b) = map(int, input().split())
	d = num * 2
	if d <= b:
		print(num, d)
	else:
		print('-1', '-1')


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
t = int(input())
for _ in range(t):
	(l, r) = map(int, stdin.readline().split())
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, l + l)


def solve():
	(l, r) = list(map(int, input().split()))
	if r - l < l:
		return [-1, -1]
	elif l * 2 <= r:
		return [l, l * 2]
	else:
		return [-1, -1]
for _ in range(int(input())):
	res = solve()
	print(res[0], res[1])


t = int(input())
for _i in range(t):
	a = input()
	a = a.split()
	x = int(a[0])
	y = int(a[1])
	if 2 * x <= y:
		print(x, 2 * x)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(n, m) = map(int, input().split())
	if m >= 2 * n:
		print(n, 2 * n)
	else:
		print(-1, -1)


def solve(l, r):
	if 2 * l > r:
		return [-1, -1]
	return [l, 2 * l]
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	a = solve(l, r)
	print(*a)


class LCM:

	def __init__(self, l, r):
		self.l = l
		self.r = r

	def getAns(self):
		if 2 * self.l > self.r:
			return (-1, -1)
		elif 2 * self.l == self.r:
			return (self.l, self.r)
		else:
			return (self.l, 2 * self.l)
t = int(input())
for i in range(t):
	(l, r) = [int(s) for s in input().split(' ')]
	lcm = LCM(l, r)
	(a, b) = lcm.getAns()
	print('{} {}'.format(a, b))


t = int(input())
for _ in range(t):
	(l, r) = list(map(lambda x: int(x), input().split()))
	x = l
	y = 2 * l
	if y > r:
		result = [-1, -1]
	else:
		result = [x, y]
	print(' '.join(list(map(lambda x: str(x), result))))


t = int(input())
for _ in range(t):
	x = input().split()
	l = int(x[0])
	r = int(x[1])
	if r < l * 2:
		print('-1 -1')
	else:
		print(str(l) + ' ' + str(2 * l))


def lc(l, r):
	if 2 * l <= r:
		print('{} {}'.format(l, 2 * l))
	else:
		print('{} {}'.format(-1, -1))
t = int(input())
while t > 0:
	(l, r) = list(map(int, input().split()))
	lc(l, r)
	t -= 1


s = []
for _ in range(int(input())):
	(l, r) = list(map(int, input().split()))
	if r >= 2 * l:
		s.append(f'{l} {2 * l}')
	else:
		s.append('-1 -1')
for i in s:
	print(i)


t = int(input())
for _ in range(t):
	s = input()
	s = [i.strip() for i in s.split(' ')]
	(l, r) = (int(s[0]), int(s[1]))
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
from collections import *
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def lcm(x, y):
	return (x, x * 2) if 2 * x <= y else (-1, -1)
for _ in range(int(input())):
	(a, b) = [int(i) for i in input().split()]
	print(*lcm(a, b))


from collections import Counter, defaultdict as dft

def mp():
	return map(int, input().split())

def ml():
	return list(map(int, input().split()))

def solve():
	(a, b) = mp()
	if b < 2 * a:
		print(-1, -1)
		return
	print(a, 2 * a)
	return
t = int(input())
for _ in range(t):
	solve()


from math import gcd
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x * 2 > y:
		print(-1, -1)
	else:
		print(x, x * 2)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	(l, r) = mi()
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


t = int(input())
while t:
	(l, r) = [int(i) for i in input().split()]
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)
	t -= 1


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	ans1 = l
	i = 2
	flag = 0
	if l <= r // 2:
		print(l, l * 2)
	else:
		print(-1, -1)


result = []
primes = {}
for t in range(int(input())):
	(l, r) = map(int, input().split())
	f = 0
	(a, b) = (-1, -1)
	if r >= 2 * l:
		(a, b) = (l, l * 2)
	result.append([a, b])
for i in result:
	print(i[0], i[1])


try:
	tst = int(input())
	for _ in range(tst):
		(l, r) = map(int, input().split())
		if 2 * l <= r:
			print(l, 2 * l)
		else:
			print(-1, -1)
except:
	pass


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		(L, R) = map(int, input().split())
		(x, y) = (L, L * 2)
		if y > R:
			print(-1, -1)
		else:
			print(x, y)
main()


import math
t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	if n > k:
		(n, k) = (k, n)
	a = n
	b = 2 * n
	if b > k:
		print(-1, -1)
	else:
		print(a, b)


__version__ = '1.0'
__date__ = '2021-04-09'
import sys

def solve(l, r) -> (int, int):
	if l * 2 > r:
		return (-1, -1)
	return (l, l * 2)

def main(argv=None):
	t = int(input())
	for _ in range(t):
		(l, r) = map(int, input().split())
		print('{} {}'.format(*solve(l, r)))
	return 0
STATUS = main()
sys.exit(STATUS)


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	(l, r) = map(int, input().split())
	a = l
	b = 2 * l
	if b > r:
		a = -1
		b = -1
	print(a, b)


import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

def solve(a, b):
	for aa in a:
		if aa in b:
			return aa
	else:
		return None

def main():
	t = int(input())
	arr = []
	for _ in range(t):
		arr.append(list(map(int, input().split(' '))))
	for i in range(t):
		(l, r) = arr[i]
		if r < l * 2:
			print('-1 -1')
		else:
			print(f'{l} {2 * l}')
main()


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(l, r) = inputnums()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
import math
for _ in range(ii()):
	(a, b) = f()
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


def calcMinorLCM(a, b, results):
	if b < a * 2:
		results.append(-1)
		results.append(-1)
	else:
		results.append(a)
		results.append(a * 2)
t = int(input())
results = []
for i in range(t):
	[a, b] = list(map(int, input().split(' ')))
	calcMinorLCM(a, b, results)
for i in range(int(len(results) / 2)):
	print(results[2 * i], results[2 * i + 1])


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list

def subarrayBitwiseOR(A):
	res = set()
	pre = {0}
	for x in A:
		pre = {x | y for y in pre} | {x}
		res |= pre
	return len(res)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def LCM(l, r):
	x = l
	y = 2 * l
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split(' '))
	LCM(l, r)


t = int(input())
thop = 0
for i in range(t):
	(l, r) = map(int, input().split())
	thop = 0
	x = l
	if 2 * x <= r:
		print(x, 2 * x)
	else:
		print(-1, -1)


ll = lambda : list(map(str, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
from datetime import datetime
from sys import stdin, stdout

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(ii()):
	(x, y) = v()
	if abs(x - y) < 1:
		print(-1, -1)
	elif x * 2 <= y:
		print(x, x * 2)
	else:
		print(-1, -1)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	(l, r) = rinput()
	x = l
	y = 2 * x
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)


num = int(input(''))
i = 0
while i < num:
	(l, r) = input('').split()
	if int(r) - int(l) < int(l):
		print('-1 -1')
	else:
		print(int(l), 2 * int(l))
	i += 1


testcases = int(input())
for i in range(testcases):
	(start, end) = [int(i) for i in input().split()]
	if start * 2 <= end:
		print(start, start * 2)
	else:
		print(-1, -1)


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	a1 = x
	a2 = 2 * x
	if a2 > y:
		a1 = -1
		a2 = -1
	print(a1, a2)


def Solve(l, r):
	a = l
	b = 2 * l
	if b > r:
		return (-1, -1)
	return (a, b)
T = int(input())
for _ in range(T):
	(l, r) = map(int, input().split())
	print(*Solve(l, r))


from sys import stdin
n = int(stdin.readline().strip())
for i in range(n):
	(x, y) = map(int, stdin.readline().strip().split())
	if x * 2 <= y:
		print(x, x * 2)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	x = l
	y = x * 2
	if y > r:
		print(-1, -1)
		continue
	else:
		print(x, y)


for _ in range(int(input())):
	(li, ri) = map(int, input().split())
	if li * 2 > ri:
		print(-1, -1)
	else:
		print(li, li * 2)


t = int(input().split()[0])
for case in range(t):
	(l, r) = map(int, input().split())
	if r >= 2 * l:
		print(str(l) + ' ' + str(2 * l))
	else:
		print('-1 -1')


t = int(input())
for i in range(t):
	ab = list(map(int, input().split()))
	l = ab[0]
	r = ab[1]
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


from sys import *
input = stdin.readline
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


test_cases = int(input())
for e in range(test_cases):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


def li():
	return list(map(int, input().split()))

def ii():
	return int(input())
testcases = int(input())
for t in range(testcases):
	(l, r) = li()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


for w in range(int(input())):
	(l, r) = map(int, input().strip().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def factors(n):
	Factors = [1]
	for i in range(2, n):
		if n % i == 0:
			Factors.append(i)
	Factors.append(n)
	return Factors
for _ in range(int(input())):
	[l, r] = [int(i) for i in input().split()]
	done = False
	for i in range(l, r // 2 + 1):
		if i * 2 <= r:
			done = True
			break
	if done:
		print(str(i) + ' ' + str(l * 2))
	else:
		print('-1 -1')


n = int(input())
for i in range(n):
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(str(l) + ' ' + str(2 * l))
	else:
		print('-1 -1')


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
for xyz in range(0, int(input())):
	(l, r) = map(int, input().split())
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


import io
import os
from collections import Counter, defaultdict, deque
import math

def solve(L, R):
	if 2 * L > R:
		return '-1 -1'
	return str(L) + ' ' + str(2 * L)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(L, R) = [int(x) for x in input().split()]
	ans = solve(L, R)
	print(ans)


import sys
from collections import OrderedDict

def main(cases):
	for (l, r) in cases:
		if 2 * l > r:
			print(-1, -1)
		else:
			print(l, 2 * l)
cases = []
for (e, line) in enumerate(sys.stdin.readlines()):
	if e == 0:
		continue
	cases.append(list(map(int, line.strip().split())))
main(cases)


I = input
pr = print

def main():
	for _ in range(int(I())):
		(l, r) = map(int, I().split())
		for x in range(l, r // 2 + 1):
			if x * 2 <= r:
				pr(x, x * 2)
				l = 0
				break
		if l:
			pr(-1, -1)
main()


import sys

def solve(l, r):
	if r >= 2 * l:
		x = l
		y = 2 * x
		return [x, y] if y <= r else [-1, -1]
	else:
		return [-1, -1]
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
cur = 0
for ti in range(T):
	(l, r) = [int(x) for x in IN[cur + 1].split(' ')]
	res = solve(l, r)
	print(' '.join([str(x) for x in res]))
	cur += 1


def main(l, r):
	if l * 2 > r:
		return (-1, -1)
	else:
		return (l, l * 2)
n = int(input())
for i in range(n):
	values = input().split()
	(l, r) = (int(values[0]), int(values[1]))
	print(*main(l, r))


import math
for w in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x * 2 <= y:
		print(x, x * 2)
	else:
		print(-1, -1)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	if a > b:
		return a / gcd(a, b) * b
	else:
		return b / gcd(a, b) * a

def getdivisors(n, b):
	i = 1
	m = n
	while i <= n:
		if n % i == 0:
			if m * (i + 1) <= b:
				temp = m / i * (i + 1)
				return temp
		i = i + 1
ls = []
t = int(input())
for z in range(t):
	s = list(map(int, input().rstrip().split()))
	a = s[0]
	b = s[1]
	(val1, val2) = (-1, -1)
	for i in range(a, b // 2 + 1):
		s = getdivisors(i, b)
		if s:
			val1 = i
			val2 = s
			break
		if val1 != -1:
			break
	ls.append(str(int(val1)) + ' ' + str(int(val2)))
for i in ls:
	print(i)


t = int(input())
for _ in range(t):
	(l, m) = map(int, input().split())
	if l * 2 > m:
		print(-1, -1)
		continue
	print(l, l * 2)


def calc(l, r):
	return False if r < l * 2 else (l, l * 2)

def get_ints():
	return [int(n) for n in input().split()]

def get_floats():
	return [float(n) for n in input().split()]

def seq2str(seq):
	return ' '.join((str(item) for item in seq))
a = get_ints()
assert len(a) == 1
t = a[0]
for i in range(t):
	a = get_ints()
	assert len(a) == 2
	(l, r) = (a[0], a[1])
	res = calc(l, r)
	if res:
		print(res[0], res[1])
	else:
		print('-1 -1')


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
num = inp()
for t in range(num):
	lis = inlt()
	l = lis[0]
	r = lis[1]
	if 2 * l > r:
		print('-1 -1')
	else:
		mylist = [l, 2 * l]
		print(*mylist)


import math
ls = lambda : list(map(int, input().split()))
ip = lambda : int(input())
r = lambda a: range(a)
lcm = lambda a, b: abs(a * b) // math.gcd(a, b)
t = ip()
for _ in r(t):
	(l, r) = ls()
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


t = int(input(''))
if t < 1 or t > 10000:
	quit()
for i in range(t):
	(l, r) = map(int, input().split())
	if r < 2 * l:
		print('-1 -1')
	else:
		print('{} {}'.format(l, 2 * l))


for _ in [0] * int(input()):
	(a, b) = map(int, input().split())
	print('{x} {y}'.format(x=str(a), y=str(a * 2)) if a * 2 <= b else '-1 -1')


for i in range(int(input())):
	a = list(map(int, input().strip().split()))[:2]
	if a[0] * 2 <= a[1]:
		print(str(a[0]) + ' ' + str(2 * a[0]))
	else:
		print(str(-1) + ' ' + str(-1))


n = int(input())
for i in range(n):
	lr = input().split()
	l = int(lr[0])
	r = int(lr[1])
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


for i in range(int(input())):
	(l, r) = list(map(int, input().split()))
	(x, y) = (-1, -1)
	for i in range(l, r + 1):
		if 2 * i <= r:
			x = i
			y = 2 * i
			break
		elif 2 * i > r:
			break
	print(' '.join([str(x), str(y)]))


def main():
	for i in range(int(input())):
		v = list(map(int, input().split()))
		num1 = v[0]
		num2 = v[1]
		if num1 > num2:
			(num1, num2) = (num2, num1)
		if 2 * num1 > num2:
			print('-1 -1')
		else:
			print(num1, 2 * num1)
main()


for _ in range(int(input())):
	(num1, num2) = map(int, input().split())
	if num1 * 2 <= num2:
		print(num1, num1 * 2)
	else:
		print(-1, -1)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	a = l
	if 2 * a <= r:
		print(a, a * 2)
	else:
		print('-1', '-1')


from collections import Counter
tests = int(input())
for _ in range(tests):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)


from collections import defaultdict, Counter
from math import ceil
alph = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	a = l
	b = 2 * a
	if b > r:
		print(-1, -1)
	else:
		print(a, b)


t = int(input())
c = []
for j in range(t):
	(l, r) = input().split()
	(l, r) = (int(l), int(r))
	if r >= 2 * l:
		x = l
		y = 2 * l
	else:
		x = -1
		y = -1
	c.append(str(x) + ' ' + str(y))
for k in c:
	print(k)


t = int(input())
while t > 0:
	t -= 1
	(n, m) = input().split()
	if 2 * int(n) > int(m):
		print('-1 -1')
	else:
		print(n + ' ' + str(2 * int(n)))


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(x, y) = MAP()
	l = x
	r = x * 2
	if r <= y:
		print(l, r)
	else:
		print(-1, -1)


T = int(input())
for _ in range(T):
	(a, b) = map(int, input().split())
	flag = 0
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


nums = list((list(map(int, input().split())) for i in range(int(input()))))
for i in nums:
	if i[0] * 2 > i[1]:
		print(-1, -1)
	else:
		print(i[0], i[0] * 2)


import sys

def i():
	return sys.stdin.readline()[:-1]
cases = int(i())
for x in range(cases):
	(l, r) = map(int, i().split())
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


entrada = int(input())
for i in range(entrada):
	(x, y) = map(int, input().split())
	if y < 2 * x:
		print('-1 -1')
	else:
		print(x, 2 * x)


def gcd(l, r):
	if l == 0:
		return r
	return gcd(r % l, l)
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	elif l * (l + 1) / gcd(l, r) <= r:
		print(l, l + 1)
	else:
		print(-1, -1)


def solve(l, r):
	if r - l >= l:
		return (l, l * 2)
	else:
		return (-1, -1)
n = int(input())
for i in range(n):
	(l, r) = map(int, input().split())
	(a1, a2) = solve(l, r)
	print(a1, a2)


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def msb(n):
	n |= n >> 1
	n |= n >> 2
	n |= n >> 4
	n |= n >> 8
	n |= n >> 16
	n |= n >> 32
	n |= n >> 64
	return n - (n >> 1)
for _ in range(inin()):
	(l, r) = cin()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print('-1 -1')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	(l, r) = li()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
for _ in range(I()):
	solve()


t = int(input())

def fun(l, r):
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)
while t:
	t -= 1
	(l, r) = map(int, input().split())
	fun(l, r)


import re
t = int(input())
for _ in range(t):
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(l, 2 * l)
		continue
	else:
		print(-1, -1)


def compute_lcm(x, y):
	if x > y:
		greater = x
	else:
		greater = y
	while True:
		if greater % x == 0 and greater % y == 0:
			lcm = greater
			break
		greater += 1
	return lcm
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	res = compute_lcm(x, y)
	if res >= l and res <= r:
		print(x, y)
	else:
		print(-1, -1)


def gcd(a, b):
	if min(a, b) == 0:
		return max(a, b)
	a_1 = max(a, b) % min(a, b)
	return gcd(a_1, min(a, b))

def lcmf(a, b):
	return a * b // gcd(a, b)
n = int(input())
for xx in range(0, n):
	(l, r) = [int(i) for i in input().split()]
	if 2 * l <= r:
		x = l
		y = 2 * x
		print(str(x) + ' ' + str(y))
	else:
		print('-1 -1')


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x * 2 <= y:
		print(x, 2 * x)
	else:
		print('-1 -1')


from math import gcd
t = int(input())
responses = []
for i in range(t):
	(l, r) = map(int, input().split())
	(x, y) = (l, l * 2)
	if y > r:
		responses.append((-1, -1))
	else:
		responses.append((x, y))
for response in responses:
	print(response[0], response[1])


import sys
from math import *
from collections import *
from random import *
inp = lambda : map(int, input().split())
t = int(input())
for _ in range(t):
	(x, y) = inp()
	if x * 2 > y:
		print(-1, -1)
	else:
		print(x, x * 2)


a = int(input())
b = 0
while b < a:
	c = input().split(' ')
	l = int(c[0])
	if 2 * l > int(c[1]):
		print(-1, -1)
	else:
		print(l, 2 * l)
	b = b + 1


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j

def fac(n):
	c = 1
	i = 1
	while i <= n:
		c *= i
		i += 1
	return c

def check_happy(n):
	ss = set()
	print(n)
	while n != 1:
		val = n
		s = 0
		print(val)
		while val != 0:
			s += (val % 10) ** 2
			val = val // 10
		print(val)
		print('hi')
		if val in ss:
			return False
		else:
			n = val
			ss.add(n)
	return True

def update(a, b):
	c = 1
	val = a
	while a < b:
		print(c, a)
		c += c
		a += a
	print(1)
	while a > b:
		print()
		a -= val
		c -= 1
	return c
import random as rand

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
from itertools import permutations

def insertion_sort(arr):
	for i in range(len(arr)):
		j = i
		while j > 0:
			if arr[j] < arr[j - 1]:
				temp = arr[j]
				arr[j] = arr[j - 1]
				arr[j - 1] = temp
			j -= 1
	return arr

def quick_sort(arr, low, high):
	i = low
	j = high
	while i < j:
		if arr[i] > arr[low] and arr[j] < arr[low]:
			temp = arr[i]
			arr[i] = arr[j]
			arr[j] = arr[i]
			i += 1
			j -= 1
		elif arr[i] <= arr[low]:
			i += 1
		elif arr[j] >= arr[low]:
			j -= 1
	print(i, j)
	toto = arr[j]
	arr[j] = arr[low]
	arr[low] = toto
	return j

def dodo(arr, low, high):
	if low < high:
		val = quick_sort(arr, low, high)
		dodo(arr, low, val - 1)
		dodo(arr, val + 1, high)
t = int(stdin.readline())
for i in range(t):
	(l, r) = map(int, stdin.readline().split(' '))
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def main():
	t = int(input())
	from math import sqrt, floor
	for _ in range(t):
		(l, r) = map(int, input().split())
		k = 2 * l
		if k > r:
			print(-1, -1)
		else:
			print(l, k)
	return
main()


t = int(input())
for i in range(0, t):
	lr = input().split()
	l = int(lr[0])
	r = int(lr[1])
	if 2 * l <= r:
		L = [l, 2 * l]
	else:
		L = [-1, -1]
	print(*L)


t = int(input())
nums = []
for i in range(t):
	nums.append([int(x) for x in input().split()])
out1 = []
for num in nums:
	l = num[0]
	r = num[1]
	if l == 1 and r == 1:
		out1.append([1, 1])
	quo = r // l
	if quo > 1:
		out1.append([l, 2 * l])
	else:
		out1.append([-1, -1])
for out in out1:
	print(*out)


t = int(input())
while t:
	t -= 1
	(l, r) = [int(x) for x in input().split()]
	x = l
	y = 2 * l
	if 2 * l > r:
		arr = [-1, -1]
		print(*arr)
	else:
		arr = [l, 2 * l]
		print(*arr)


import math

def lcm(a, b):
	return a * b // math.gcd(a, b)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	flag = 0
	if l == 1 or r == 1:
		print('1 2')
		continue
	if 2 * l <= r:
		print(l, 2 * l)
		continue
	print('-1 -1')


from os import path
import sys
from heapq import heappush, heappop, heapify
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		(l, r) = mi()
		if r < 2 * l:
			print('-1 -1')
		else:
			print(l, 2 * l)
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


from math import gcd

def lcmRange(a, b):
	ans = a * b // gcd(a, b)
	return ans
t = int(input())
for t in range(t):
	(l, r) = map(int, input().split())
	x = l
	d = []
	flag = 0
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
T = int(input())
for t in range(T):
	(x, y) = map(int, input().split())
	if 2 * x <= y:
		print(x, end=' ')
		print(2 * x)
	else:
		print('-1 -1')


t = int(input())
for i in range(t):
	ch = input()
	L = [int(i) for i in ch.split()]
	(a, b) = (L[0], L[1])
	if 2 * a > b:
		print(-1, -1)
	else:
		print(a, 2 * a)


import math
t = int(input())

def IsPrime(x):
	if x > 1:
		k = 0
		for i in range(2, x ** 0.5 + 1):
			if x % i == 0:
				k += 1
		if n != 2 and k > 0:
			return False
		else:
			return True
	else:
		return False
for k in range(t):
	m = []
	(l, r) = map(int, input().split(' '))
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


for _ in range(int(input())):
	(l, r) = [int(__) for __ in input().split()]
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


for i in range(int(input())):
	l = list(map(int, input().split()))
	if l[1] >= l[0] << 1:
		print(l[0], l[0] << 1)
	else:
		print(-1, -1)


test = int(input())
for _ in range(test):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, end=' ')
		print(2 * l)
	else:
		print(-1, end=' ')
		print(-1)


production = True
import sys, math, collections, bisect, itertools, heapq, decimal, random, copy, re

def input(f=0, m=0):
	if m > 0:
		return [input(f) for i in range(m)]
	else:
		l = sys.stdin.readline()[:-1]
		if f >= 10:
			u = False
			f = int(str(f)[-1])
		else:
			u = True
		if f == 0:
			p = [l]
		elif f == 1:
			p = list(map(int, l.split()))
		elif f == 2:
			p = list(map(float, l.split()))
		elif f == 3:
			p = list(l)
		elif f == 4:
			p = list(map(int, list(l)))
		elif f == 5:
			p = l.split()
		return p if u else p[0]

def out(l, f=0, n=True):
	if f == 0:
		p = str(l)
	elif f == 1:
		p = ' '.join(map(str, l))
	elif f == 2:
		p = '\n'.join(map(str, l))
	elif f == 3:
		p = ''.join(map(str, l))
	print(p, end='\n' if n else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: a + 1 & 1

def mapl(i, f=0):
	if f == 0:
		return list(map(int, i))
	elif f == 1:
		return list(map(str, i))
	elif f == 2:
		return list(map(list, i))

def solve():
	(l, r) = input(1)
	if l * 2 <= r:
		out([l, l * 2], 1)
	else:
		out([-1, -1], 1)
	return
for i in range(input(11)):
	solve()


import sys

def findLCM(start, end):
	minCandidate = start
	lcm = start * 2
	if lcm <= end:
		sys.stdout.write(str(minCandidate) + ' ' + str(lcm) + '\n')
	else:
		sys.stdout.write('-1 -1\n')
casos = int(sys.stdin.readline().rstrip('\n'))
for i in range(casos):
	(start, end) = sys.stdin.readline().rstrip('\n').split(' ')
	findLCM(int(start), int(end))


import sys
T = int(sys.stdin.readline().strip())
for t in range(0, T):
	(l, r) = list(map(int, sys.stdin.readline().strip().split()))
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


for i in range(int(input())):
	(l, a) = map(int, input().split())
	if l == 1 and a == 1:
		print('1', '1')
	elif l == 1:
		print('1', '2')
	else:
		x = l
		y = 2 * l
		if y <= a:
			print(x, y)
		else:
			print('-1', '-1')


t = int(input())
for _ in range(0, t):
	(l, r) = map(int, input().strip().split(' '))
	ans = []
	i = l
	while i <= r:
		if 2 * i <= r:
			ans.append(i)
			ans.append(2 * i)
			break
		else:
			break
		i += 1
	if ans == []:
		print(-1, -1)
	else:
		print(*ans)


import sys
import math
read = sys.stdin.buffer.read
readlines = sys.stdin.buffer.readlines
t = int(input())
for case in range(t):
	(a, b) = map(int, input().split())
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	(a, b) = Ri()
	if 2 * a > b:
		print(-1, -1)
	else:
		print(a, 2 * a)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def pr(a, b):
	if a > b:
		print(b, a)
	else:
		print(a, b)
t = int(input())
while t > 0:
	(l, r) = [int(ele) for ele in input().split()]
	ans = lcm(l * 2, l)
	if ans >= l and ans <= r:
		pr(l * 2, l)
	else:
		print(-1, -1)
	t = t - 1


import sys

def lcmSolver(l, r):
	x = l
	y = 2 * l
	if y > r:
		return (-1, -1)
	else:
		return (x, y)
casos = sys.stdin.readline().rstrip('\n')
for i in range(int(casos)):
	numbero = sys.stdin.readline().rstrip('\n').split(' ')
	number = lcmSolver(int(numbero[0]), int(numbero[1]))
	sys.stdout.write(str(number[0]) + ' ' + str(number[1]) + '\n')


t = int(input())
for tt in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = l + l
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)


t = int(input())
while t > 0:
	m = list(map(int, input().split()))
	l = m[0]
	r = m[1]
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
	t = t - 1


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	(x, y) = list(map(int, input().split()))
	if x * 2 > y:
		print('-1 -1')
	else:
		print(x, 2 * x)
main()


def main():
	T = int(input())
	while T:
		(a, b) = list(map(int, input().split()))
		if 2 * a <= b:
			print(a, 2 * a)
		else:
			print(-1, -1)
		T -= 1
main()


def fun(ls):
	(a, b) = ls
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)
T = int(input())
for _ in range(T):
	ls = list(map(int, input().split()))
	fun(ls)


import math

def main():
	for _ in range(int(input())):
		(l, r) = list(map(int, input().split()))
		if l * r // math.gcd(l, l + 1) <= r:
			print(l, l + 1)
		else:
			f = False
			for i in range(l, r + 1):
				if 2 * l <= r:
					print(l, 2 * l)
					f = True
					break
				else:
					break
			if not f:
				print(-1, -1)
main()


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
sys.setrecursionlimit(3 * 10 ** 6)

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def isSubsetSum(arr, n, summ):
	subarr = [[False for i in range(summ + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subarr[i][0] = True
	for i in range(1, summ + 1):
		subarr[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, summ + 1):
			if j < arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j]
			if j >= arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j] or subarr[i - 1][j - arr[i - 1]]
	return subarr[n][summ]

def bfs(v, adj, onpath):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

@bootstrap
def dfs(v, p, adj, b, path):
	if v == b:
		path.append(b)
		yield True
	for u in adj[v]:
		if u == p:
			continue
		on = (yield dfs(u, v, adj, b, path))
		if on:
			path.append(v)
			yield True
	yield False

@bootstrap
def dfs1(v, p, adj, d, mcd, onpath, c, root):
	if len(mcd) < d + 1:
		mcd.append([c[v], d, root, v])
	if mcd[d][0] > c[v]:
		mcd[d][0] = c[v]
		mcd[d][3] = v
	for u in adj[v]:
		if u == p or onpath[u]:
			continue
		yield dfs1(u, v, adj, d + 1, mcd, onpath, c, root)
	yield False

def solution(l, r):
	if r >= 2 * l:
		return f'{l} {2 * l}'
	return '-1 -1'

def main():
	T = 1
	T = ri()
	for i in range(T):
		(l, r) = ria()
		x = solution(l, r)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


n = int(input())
for i in range(n):
	[x, y] = map(int, input().split())
	if x <= y >> 1:
		print(x, end=' ')
		print(x << 1)
	else:
		print('-1 -1')


def fun(a, b):
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)
for j in range(int(input())):
	(a, b) = map(int, input().split())
	fun(a, b)


for _ in range(int(input())):
	X = list(map(int, input().split()))
	Ans = str(X[0]) + ' ' + str(X[0] * 2)
	print(Ans if X[0] * 2 in range(X[0], X[1] + 1) else '-1 -1')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	a = min(a, b)
	b = max(a, b)
	if 2 * a > b:
		print(-1, -1)
	else:
		print(a, 2 * a)


case = int(input())
for caseNum in range(0, case):
	(a, b) = [int(x) for x in input().split()]
	if a * 2 <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


for ii in range(int(input())):
	(n, m) = map(int, input().split())
	ans = min(n, m) * 2
	if ans <= max(n, m):
		print(min(n, m), ans)
	else:
		print(-1, -1)


n = int(input())
l1 = []
for i in range(n):
	l1.append([int(x) for x in input().split()])
for i in range(n):
	if l1[i][1] < 2 * l1[i][0]:
		print(-1, -1)
	else:
		print(l1[i][0], l1[i][0] * 2)
print()


def lcm_check(l_val, r_val):
	if 2 * l_val > r_val:
		print('-1 -1')
	else:
		print(f'{l_val} {2 * l_val}')
cases = int(input())
cases_list = [0] * cases
for i in range(cases):
	cases_list[i] = input().split()
for case in cases_list:
	lcm_check(int(case[0]), int(case[1]))


from math import gcd
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


for _ in range(int(input())):
	(l, r) = map(int, input().strip().split())
	if l * 2 > r:
		print('-1 -1')
	else:
		print('{} {}'.format(l, l * 2))


import math as mt

def tran(arr):
	if arr[1] < 2 * arr[0]:
		return [-1, -1]
	else:
		return [arr[0], 2 * arr[0]]
if 1 > 0:
	t = int(input())
	ans = []
	for i in range(t):
		arr = list(map(int, input().rstrip().split()))
		r = tran(arr)
		ans.append(r)
	for i in ans:
		print(*i)


def hcf(a, b):
	if b == 0:
		return a
	return hcf(b, a % b)

def lcm(a, b):
	return a * b // hcf(a, b)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l > r // 2:
		print(-1, -1)
	else:
		print(l, 2 * l)


from math import gcd

def lcm(x, y):
	return x * y // gcd(x, y)

def test():
	(l, r) = map(int, input().split())
	if r < l * 2:
		return '-1 -1'
	for x in range(l, r + 1):
		for y in range(x * 2, r + 1):
			if l <= lcm(x, y) <= r:
				return f'{x} {y}'
	return '-1 -1'
n = int(input())
for _ in range(n):
	print(test())


import sys, math as mt
import heapq as hp
I = lambda : list(map(int, input().split()))
import math as mt

def lcm(a, b):
	return a * b // mt.gcd(a, b)
for tc in range(int(input())):
	(a, b) = I()
	x = 2 * a if 2 * a <= b else -1
	if x != -1:
		print(a, 2 * a)
	elif a == b:
		print(-1, -1)
	elif lcm(a, a + 1) <= b:
		print(a, a + 1)
	else:
		print(-1, -1)


for _ in range(int(input())):
	li = list(map(int, input().strip().split()))
	(l, r) = (li[0], li[1])
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


a = int(input())
for i in range(a):
	st = str(input()).split(' ')
	l = int(st[0])
	r = int(st[1])
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(l, r) = I()
	x = y = -1
	if 2 * l <= r:
		x = l
		y = 2 * l
	print(x, y)


import sys
readline = sys.stdin.readline

def solve():
	(L, R) = map(int, readline().split())
	if L * 2 <= R:
		print(L, L * 2)
	else:
		print(-1, -1)
T = int(readline())
for t in range(T):
	solve()


for s in [*open(0)][1:]:
	(x, y) = map(int, s.split())
	print(*[[x, x * 2], [-1] * 2][x * 2 > y])


from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def main():
	T = int(input())
	for _ in range(T):
		(l, r) = getlist()
		if l * 2 > r:
			print(-1, -1)
		else:
			print(l, 2 * l)
main()


import sys, math, bisect
from collections import Counter, defaultdict as dd

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def l():
	return list(sp())

def strl():
	return list(strsp())

def sp():
	return map(int, data().split())

def strsp():
	return map(str, data().split())
for _ in range(int(data())):
	(a, b) = sp()
	if b - a < a:
		print('-1 -1')
	else:
		print(a, 2 * a)


def getGCD(a, b):
	if a == 0:
		return int(b)
	return getGCD(b % a, a)

def getLCM(a, b):
	return int(a * b / getGCD(a, b))

def solve1389(l, r):
	(x, y) = (l, l * 2)
	if l <= getLCM(x, y) <= r:
		return (x, y)
	return (-1, -1)
t = int(input())
while t:
	lr = list(map(int, input().split()))
	(x, y) = solve1389(lr[0], lr[1])
	print(x, y)
	t -= 1


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * x
	if l <= y <= r:
		print(x, y)
	else:
		print(-1, -1)


res = ''
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	res += ('-1 -1\n', '%d %d\n' % (l, l * 2))[l * 2 <= r]
print(res)


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for c in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


R1 = lambda : list(map(int, input().split()))
R2 = lambda : int(input())
for _ in range(R2()):
	(l, r) = R1()
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	(l, r) = getVars()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def solv():
	(x, y) = map(int, input().split())
	if y < 2 * x:
		print(-1, -1)
	else:
		print(x, 2 * x)
for _ in range(int(input())):
	solv()


import sys
from collections import deque, defaultdict
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def main():
	for _ in range(ii()):
		(l, r) = mi()
		if r < 2 * l:
			print(-1, -1)
		else:
			print(l, 2 * l)
main()


def fast(l, r):
	if 2 * l > r:
		return (-1, -1)
	return (l, 2 * l)

def main():
	t = int(input())
	for _ in range(t):
		(l, r) = [int(x) for x in input().split()]
		result = fast(l, r)
		print(' '.join((str(x) for x in result)))
main()


def lcm(a, b):
	return a * b // gcd(a, b)
for tc in range(int(input())):
	(x, y) = map(int, input().split())
	if abs(x - y) < 1:
		print(-1, -1)
	elif x * 2 <= y:
		print(x, x * 2)
	else:
		print(-1, -1)


a = input()
for x in range(int(a)):
	b = input().split(' ')
	tag = int(b[0])
	tag1 = int(b[1])
	if tag * 2 > tag1:
		print(-1, -1)
	else:
		print(tag, tag * 2)


t = int(input())
for t1 in range(t):
	(l, r) = [int(x) for x in input().split()]
	a = l
	b = 2 * a
	if r >= a and r >= b:
		print(a, end=' ')
		print(b)
	else:
		print(-1, end=' ')
		print(-1)


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [str(i) for i in input()]

def inn():
	return int(input())
t = int(input())
while t:
	t -= 1
	(a, b) = value()
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


import sys
import math
from decimal import *

def I():
	return int(sys.stdin.readline())

def IL():
	return list(map(int, sys.stdin.readline().strip().split()))

def ILS():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve():
	tt = I()
	for ii in range(tt):
		(l, r) = IL()
		a = l
		b = l * 2
		if b <= r:
			print(a, b)
		else:
			print(-1, -1)
		pass
solve()


from math import *
from collections import *
from random import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	(l, r) = map(int, input().split())
	a = l
	b = 2 * l
	if a >= l and b <= r:
		print(a, b)
	else:
		print(-1, -1)


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
t = sys.stdin.readline()
while t:
	t = int(t)
	(l, r) = input().split()
	(l, r) = (int(l), int(r))
	if 2 * l > r:
		print('{} {}'.format(-1, -1))
	else:
		print('{} {}'.format(l, 2 * l))
	t -= 1


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
t = int(input())
for T in range(t):
	(l, r) = [int(x) for x in input().split()]
	(v1, v2) = (l, 2 * l)
	val = v1 * v2 // gcd(v1, v2)
	if v2 <= r and val <= r and (val >= l):
		print(v1, v2)
	else:
		print(-1, -1)


t = int(input())
for you in range(t):
	l = input().split()
	r = int(l[1])
	l = int(l[0])
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	(l, r) = MAP()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)
for _ in range(IN()):
	case()


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	(l, r) = invr()
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


for p in range(int(input())):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if 2 * l > r:
		print('-1 -1')
	else:
		print(l, 2 * l)


from sys import stdin
ip = stdin.readline
t = int(ip())
while t:
	t -= 1
	(l, r) = map(int, ip().split())
	double = 2 * l
	if double <= r:
		print(l, double)
	else:
		print('-1 -1')


for _ in range(int(input())):
	(l, r) = [int(c) for c in input().split()]
	if l * 2 <= r:
		print(str(l) + ' ' + str(l * 2))
	else:
		print('-1 -1')


for u in range(int(input())):
	(l, r) = map(int, input().split())
	x = l * 2
	if x <= r and x >= l:
		print(l, x)
	else:
		print(-1, -1)


t = int(input())
for i in range(t):
	(A, B) = [int(x) for x in input().split()]
	if 2 * A <= B:
		print(A, A * 2)
	else:
		print('-1 -1')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
Read = lambda : list(map(int, input().split()))
Num = lambda : int(input())

def solve():
	(a, b) = Read()
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)
for _ in range(Num()):
	solve()


n = int(input())
a = []
b = []
for i in range(n):
	(l, r) = input().split()
	l1 = int(l)
	r1 = int(r)
	p = 0
	if l1 * 2 > r1:
		a.append(-1)
		b.append(-1)
	else:
		a.append(l1)
		b.append(2 * l1)
for j in range(n):
	print(a[j], b[j])


import sys
from collections import defaultdict as dd
from collections import Counter as cc
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = lambda : sys.stdin.buffer.readline().rstrip()
for _ in range(int(input())):
	(q, w) = map(int, input().split())
	if w >= 2 * q:
		print(q, 2 * q)
	else:
		print(-1, -1)


import math

def lcm(a, b):
	return a * b // math.gcd(a, b)

def lcmfind(x, y):
	if x * 2 <= r:
		print(x, end=' ')
		print(x * 2)
	else:
		print(-1, end=' ')
		print(-1)
t = int(input())
for t_itr in range(t):
	lr = input().strip().split()
	l = int(lr[0])
	r = int(lr[1])
	lcmfind(l, r)


import math

def BuubleSort(h, m):
	if m < h * 2:
		l = [-1, -1]
		return l
	else:
		l = [h, h * 2]
		return l

def main():
	t = int(input())
	for _ in range(t):
		(h, m) = map(int, input().split())
		ans = BuubleSort(h, m)
		print(*ans)
main()


ans = []
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		ans.append([-1, -1])
	else:
		ans.append([l, 2 * l])
for a in ans:
	print(*a)


def main():
	t = int(input())
	for i in range(t):
		(x, y) = map(int, input().split())
		if x * 2 > y:
			print(-1, -1)
		else:
			print(x, x * 2)
main()


(a, d) = (int(input()), [])
for i in range(0, a):
	b = [int(i) for i in input().split(' ')]
	if min(b) * 2 > max(b):
		d.append([-1, -1])
	else:
		d.append([min(b), min(b) * 2])
for i in d:
	print(*i)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	c = min(a, b)
	b = max(a, b)
	a = c
	if b >= 2 * a:
		print(a, 2 * a)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
for k in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
t = int(input())
while t:
	t -= 1
	(l, r) = [int(x) for x in input().split()]
	res = l * r // math.gcd(l, 2 * l)
	if res <= r and 2 * l <= r:
		print(*[l, 2 * l])
	else:
		print(*[-1, -1])


t = int(input())
s = []
for i in range(t):
	(a, b) = list(map(int, input().split()))
	if b / a >= 2:
		s.append((a, 2 * a))
	else:
		s.append((-1, -1))
for j in range(t):
	print(*s[j])


import sys
from math import ceil
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	(l, r) = map(int, input().split())
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


import sys
input = sys.stdin.readline

def main():
	for test_case in range(int(input())):
		(l, r) = [int(j) for j in input().split()]
		if 2 * l > r:
			print(-1, -1)
		else:
			print(l, 2 * l)
	return
main()
pass


for i in range(int(input())):
	(l, n) = map(int, input().split())
	if n < l * 2:
		print(-1, -1)
	else:
		print(l, l * 2)


def solve(a, b):
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print('-1 -1')
t = int(input())
for i in range(t):
	(a, b) = input().split()
	solve(int(a), int(b))


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary_rep(n):
	l = []
	while n > 0:
		l.append(n % 2)
		n = n // 2
	return l
for t in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


for s in [*open(0)][1:]:
	(l, r) = map(int, s.split())
	print(*([l, 2 * l], [-1] * 2)[r < 2 * l])


def main():
	t = Iint()
	for _ in range(t):
		(l, r) = Imap()
		if 2 * l <= r:
			print(l, 2 * l)
		else:
			print(-1, -1)
FIO = 1

def I():
	return input()

def Iint():
	return int(input())

def Ilist():
	return list(map(int, input().split()))

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import sys
	import os
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


test = int(input())
while test > 0:
	s = input()
	lst = s.split()
	l = int(lst[0])
	r = int(lst[1])
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)
	test -= 1


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
T = int(input())
for i in range(T):
	(l, r) = map(int, input().split())
	x = l
	y = l * 2
	cc = lcm(x, y)
	if l <= x and x < y and (y <= r) and (l <= cc) and (cc <= r):
		print(x, y, sep=' ')
	elif 2 * l == r:
		print(l, r, sep=' ')
	else:
		print(-1, -1, sep=' ')


t = int(input())
res = []
i = 0
while i < t:
	entrada = input().split()
	l = int(entrada[0])
	r = int(entrada[1])
	if 2 * l <= r:
		res.append(l)
		res.append(2 * l)
	else:
		res.append(-1)
		res.append(-1)
	i += 1
j = 0
while j < len(res) - 1:
	print(res[j], res[j + 1])
	j += 2


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
input = stdin.readline
letters = ascii_letters[:26]
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


t = int(input())
for case in range(t):
	(l, r) = [int(s) for s in input().split(' ')]
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	(l, r) = get_tuple()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


for _ in range(int(input())):
	(L, R) = map(int, input().split())
	if 2 * L > R:
		print(-1, -1)
	else:
		print(L, 2 * L)


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	l = int(l1[0])
	r = int(l1[1])
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


n1 = int(input())

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for x in range(n1):
	n2 = input().split(' ')
	a = int(n2[0])
	b = int(n2[1])
	if a > b:
		(a, b) = (b, a)
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


def solve():
	(n, m) = map(int, input().split())
	if 2 * n > m:
		print(-1, -1)
	else:
		print(n, 2 * n)
t = int(input())
for i in range(t):
	solve()


from itertools import permutations
from bisect import bisect_left
from math import ceil
from math import radians
from heapq import heapify, heappush, heappop
import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li1():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0 and i % 2 == 1:
			s.add(i)
			n = n // i
	if n > 2 and n % 2 == 1:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = map(int, input().split())
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def treeOrderByDepth(n, adj, root=0):
	parent = [-2] + [-1] * (n - 1)
	ordered = []
	q = deque()
	q.append(root)
	depth = [0] * n
	while q:
		c = q.popleft()
		ordered.append(c)
		for a in adj[c]:
			if parent[a] == -1:
				parent[a] = c
				depth[a] = depth[c] + 1
				q.append(a)
	return (ordered, parent, depth)

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def nextPowerOf2(n):
	count = 0
	if n and (not n & n - 1):
		return n
	while n != 0:
		n >>= 1
		count += 1
	return 1 << count

def cou(n):
	c = 0
	while n > 1:
		c += 1
		n //= 2
	return c

def sortsec(l):
	return sorted(l, key=lambda x: x[1])

def BinarySearch(a, x):
	i = bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def subarray(A):
	r = set()
	p = {0}
	for x in A:
		p = {x | y for y in p} | {x}
		r |= p
	return len(r)
for _ in range(ii()):
	(l, r) = mi()
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import gcd, log, comb, perm, factorial
mod = int(1000000000.0 + 7)
inf = int(1e+20)
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
ii = lambda : int(input())
t = ii()
for _ in range(t):
	(l, r) = li()
	if l * 2 <= r:
		print(f'{l} {l * 2}')
	else:
		print(f'{-1} {-1}')


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def main():
	(n, m) = map(int, input().split())
	if 2 * n > m:
		print(-1, -1)
	else:
		print(n, 2 * n)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


T = int(input())
for i in range(1, T + 1):
	lst = input().split()
	l = int(lst[0])
	r = int(lst[1])
	if 2 * l > r:
		print('-1 -1')
		continue
	x = l
	y = 2 * x
	print(x, y)


t = int(input())
for _ in range(t):
	inp = list(map(int, input().split()))
	a = inp[0]
	b = inp[1]
	if b < 2 * a:
		print(-1, end=' ')
		print(-1)
	else:
		print(a, end=' ')
		print(2 * a)


t = int(input())
responses = []
for i in range(t):
	(l, r) = map(int, input().split())
	(x, y) = (l, l * 2)
	if y > r:
		responses.append((-1, -1))
	else:
		responses.append((x, y))
for response in responses:
	print(response[0], response[1])


from math import gcd
import sys
input = sys.stdin.readline
t = int(input())

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(t):
	(l, r) = map(int, input().split())
	if l * 2 > r:
		print(-1, -1)
		continue
	else:
		lcm = l * 2
		x = l
		y = lcm
		print(x, y)


def main():
	(l, r) = map(int, input().split())
	if r < 2 * l:
		print('-1 -1')
		return
	x = l
	y = 2 * l
	print(x, y)
for _ in range(int(input())):
	main()


for _ in range(int(input())):
	(q, y) = map(int, input().split())
	if q <= q * 2 <= y:
		print(q, 2 * q)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline
t = int(input())
for ii in range(t):
	(l, r) = map(int, input().split())
	twice = 2 * l
	if twice > r:
		print(-1, -1)
	else:
		print(l, twice)


def solve(l, r):
	if 2 * l > r:
		print('-1 -1')
	else:
		print('{} {}'.format(l, 2 * l))

def main():
	for i in range(int(input())):
		(x, y) = map(int, input().split())
		solve(x, y)
main()


T = int(input())
for _ in range(T):
	(l, r) = map(int, input().split())
	if abs(l - r) == 1 and l != 1:
		print(-1, -1)
	elif 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


from collections import defaultdict
t = int(input())
for _ in range(t):
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


test = int(input())
for t in range(test):
	(l, r) = map(int, input().split())
	x = l
	y = l * 2
	if y <= r:
		print(x, y)
	else:
		print('-1 -1')


t = int(input())
(a, b) = (-1, -1)
while t > 0:
	t -= 1
	g = []
	(l, r) = input().split()
	(l, r) = (int(l), int(r))
	x = l
	y = 2 * l
	if y <= r:
		print(f'{x} {y}')
	else:
		print(f'{a} {b}')


def lcm(l, r):
	while 2 * l <= r + 1:
		if 2 * l <= r:
			print(f'{l} {2 * l}')
			return
		l += 1
	print('-1 -1')
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	lcm(l, r)


import sys

def inp():
	inp = input().split()
	if len(inp) == 1:
		return int(inp[0])
	else:
		return (int(i) for i in inp)

def inplist():
	inp = input().split()
	for i in range(len(inp)):
		inp[i] = int(inp[i])
	return inp
testcases = inp()
for testcase in range(testcases):
	(x, y) = inp()
	if 2 * x <= y:
		print(x, 2 * x)
	else:
		print(-1, -1)


import sys

def input():
	return sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	(l, r) = map(int, input().split())
	x = l
	y = 2 * l
	if y > r:
		print(-1, -1)
	else:
		print(x, y)


for tst in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def small_lcm(a, b):
	if 2 * a > b:
		return (-1, -1)
	return (a, 2 * a)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(' '.join(map(str, small_lcm(a, b))))


T = int(input())

def solve():
	if r < 2 * l:
		ans = '-1 -1'
	else:
		ans = str(l) + ' ' + str(2 * l)
	return ans
for test in range(T):
	(l, r) = map(int, input().split())
	print(solve())


a = int(input())
for i in range(a):
	ch = input()
	l = ch.split()
	b = int(l[0])
	c = int(l[1])
	if 2 * b <= c:
		print(b, 2 * b)
	else:
		print(-1, -1)


t = int(input())
for case in range(t):
	(l, r) = list(map(int, input().split()))
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


def func():
	arr = [int(i) for i in input().split()]
	l = arr[0]
	r = arr[1]
	x = l
	y = 2 * l
	if y <= r:
		print(str(x) + ' ' + str(y))
	else:
		print('-1 -1')
t = int(input())
for i in range(t):
	func()


t = int(input())
while t:
	t -= 1
	f = 0
	(l, r) = map(int, input().split())
	if r < l * 2:
		f = 0
	elif r >= l * 2:
		x = l
		y = l * 2
		f = 1
	if f:
		print(x, y, sep=' ')
	else:
		print('-1 -1')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	(l, r) = sep()
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)
testcase(int(inp()))


def prob_mod(a):
	l = a[0]
	r = a[1]
	if r < 2 * l:
		return (-1, -1)
	else:
		return (l, 2 * l)
n = int(input())
ans = []
for i in range(n):
	a = list(map(int, input().split()))
	ans.append(prob_mod(a))
for i in ans:
	print(i[0], i[1])


def Input(String):
	List = String.split(' ')
	for i in range(len(List)):
		List[i] = int(List[i])
	return List

def Return(String):
	[int1, int2] = Input(String)
	if int2 >= 2 * int1:
		print(str(int1) + ' ' + str(2 * int1))
	else:
		print('-1 -1')
Trials = int(input(''))
for i in range(Trials):
	String = input('')
	Return(String)


for testcases in range(int(input())):
	num = list(map(int, input().split()))
	lens = num[1] + 1 - num[0]
	i = 0
	flag = 0
	abc = 0
	k = num[0]
	if num[0] * 2 <= num[1]:
		print(num[0], num[0] * 2)
	else:
		print('-1 -1')


t = int(input(''))
num = []
for i in range(t):
	num.append(list(map(int, input().split())))
for i in num:
	if 2 * i[0] > i[1]:
		print(-1, -1)
	else:
		print(i[0], 2 * i[0])


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	(l, r) = map(int, inputi().split())
	if r < l * 2:
		print(-1, -1)
	else:
		print(l, 2 * l)

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


import sys, math

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lmii():
	return list(mii())

def main():
	for _ in range(ii()):
		(a, b) = mii()
		if b >= 2 * a:
			print(a, 2 * a)
		else:
			print(-1, -1)
main()


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(l, r) = neo()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def finder(l, r):
	if lcm(l, 2 * l) in range(l, r + 1):
		return [str(l), str(2 * l)]
testCases = int(input())
arrays = []
for _ in range(testCases):
	arrays.append(list(map(int, input().split())))
for i in range(testCases):
	a = finder(arrays[i][0], arrays[i][1])
	if a is None:
		print(-1, -1)
	else:
		print(' '.join(a))


for test in range(0, int(input())):
	(a, b) = [int(x) for x in input().split()]
	p = min(a, b)
	q = max(a, b)
	if q < 2 * p:
		print(-1, -1)
	else:
		print(p, p * 2)


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(t,) = mp()
for _ in range(t):
	(l, r) = mp()
	if l + l > r:
		cout('-1 -1\n')
	else:
		cout(str(l) + ' ' + str(l + l) + '\n')


t = int(input())
while t != 0:
	temp = input()
	(l, r) = temp.split()
	l = int(l)
	r = int(r)
	x = -1
	y = -1
	if r >= 2 * l:
		(x, y) = (l, 2 * l)
	print(x, y)
	t -= 1


from math import gcd

def main():
	for _ in range(int(input())):
		(x, y) = map(int, input().split())
		if lcm(x, x * 2) > y:
			print('-1 -1')
		else:
			print(x, x * 2)

def lcm(x, y):
	return x * y // gcd(x, y)
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		(l, r) = RL()
		if l * 2 <= r:
			print(l, 2 * l)
		else:
			print(-1, -1)
main()


t = int(input())
for _ in range(t):
	(l, r) = input().split()
	cnt = 0
	if 2 * int(l) > int(r):
		print('-1 -1')
	else:
		print(int(l), int(l) * 2)


def solution(caso):
	if 2 * caso[0] <= caso[1]:
		print('%d %d' % (caso[0], caso[0] * 2))
	else:
		print('-1 -1')
n_casos = int(input())
casos = []
for i in range(n_casos):
	(l, r) = map(int, input().split(' '))
	casos.append((l, r))
for caso in casos:
	solution(caso)


for _ in range(int(input())):
	(l, s) = sorted(map(int, input().split()))
	print(*([-1, -1], [l, l * 2])[l * 2 <= s])


for t in range(int(input())):
	(l, r) = map(int, input().split())
	ans = [-1, -1]
	if r < 2 * l:
		print(*ans)
	else:
		ans[0] = l
		ans[1] = 2 * l
		print(*ans)


import sys

def main():
	T = int(sys.stdin.readline())
	for t in range(T):
		(l, r) = map(int, sys.stdin.readline().strip().split())
		(x, y) = (l, 2 * l)
		print(f'{x} {y}' if y <= r else '-1 -1')
main()


T = int(input())
for _ in range(T):
	(l, r) = list(map(int, input().split()))
	x = -1
	y = -1
	i = l
	if i * 2 <= r:
		x = i
		y = i * 2
	if x == -1:
		print('-1 -1')
	else:
		print(x, y)


def lcm_problem(x, y):
	if 2 * x > y:
		print(-1, -1)
		return
	print(x, 2 * x)
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	lcm_problem(x, y)


def bcd(x, y):
	if x == 1 or y == 1:
		return 1
	if y > x:
		(x, y) = (y, x)
	while x % y != 0:
		a = y
		b = x % y
		(x, y) = (a, b)
	return y

def lcm(x, y):
	return x // bcd(x, y) * y
t = int(input())
for i in range(t):
	(l, r) = (int(data) for data in input().split())
	if 2 * l > r:
		print('-1 -1')
	else:
		print(l, 2 * l)


import sys, collections, math

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	(l, r) = get_ints()
	if 2 * l > r:
		print(-1, -1)
		continue
	print(l, 2 * l)


r = int(input())
for i in range(r):
	(a, b) = map(lambda x: int(x), input().split())
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


n = int(input())
cases = [map(int, input().split()) for _ in range(n)]

def LMC(a, b):
	for i in range(b, a * b, a):
		if i % a == 0:
			return i
	else:
		return a * b
for case in cases:
	(l, r) = case
	x = LMC(l, l * 2)
	if x >= l and x <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


from math import gcd
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * x
	lcm = x * y // gcd(x, y)
	if l <= x < y <= r and l <= lcm <= r:
		print(x, y)
	else:
		print(-1, -1)


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
	(a, b) = nm()
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, 2 * a)
	return
T = ni()
for _ in range(T):
	solve()


import sys
import math

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(l, r) = get_ints()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


t = int(input())
for i in range(t):
	(lt, rt) = input().split()
	lt = int(lt)
	rt = int(rt)
	if rt >= lt * 2:
		print(lt, lt * 2)
	else:
		print(-1, -1)


def LCM(x, y):
	if x < y:
		j = x
	elif x > y:
		j = y
	while True:
		if j % x == 0 and j % y == 0:
			return j
		else:
			j += 1
t = int(input())
for i in range(t):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if 2 * l > r:
		print('-1 -1')
	else:
		print(str(l), str(2 * l))


import sys
input = sys.stdin.readline
T = int(input())
for i in range(T):
	(l, r) = map(int, input().split())
	x = l
	y = l * 2
	if y > r:
		print(-1, -1)
		continue
	print(x, y)


from collections import defaultdict

def ii():
	return int(input())

def si():
	return input()

def li():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())
import math

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
t = ii()
for _ in range(t):
	(l, r) = mi()
	b = True
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


t = int(input())
lis = []
out = []
for i in range(t):
	lis.append([int(j) for j in input().split()])
	(l, r) = lis[i]
	x = l
	if 2 * x > r:
		out.append('-1 -1')
	else:
		out.append('{} {}'.format(x, 2 * x))
for i in out:
	print(i)


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(n, m) = [int(x) for x in inp().split()]
	if n * 2 > m:
		print(-1, -1)
	else:
		print(n, 2 * n)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	(l, r) = inp()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class union_find:

	def __init__(self, n):
		self.n = n
		self.rank = [0] * n
		self.parent = [int(j) for j in range(n)]

	def union(self, i, j):
		i = self.find(i)
		j = self.find(j)
		if self.rank[i] == self.rank[j]:
			self.parent[i] = j
			self.rank[j] += 1
		elif self.rank[i] > self.rank[j]:
			self.parent[j] = i
		else:
			self.parent[i] = j

	def find(self, i):
		temp = i
		if self.parent[temp] != temp:
			self.parent[temp] = self.find(self.parent[temp])
		return self.parent[temp]
from math import log2, ceil

def main():
	for t in range(int(input())):
		(a, b) = [int(j) for j in input().split()]
		if b >= 2 * a:
			print(a, 2 * a)
		else:
			print(-1, -1)
main()


def gcd(x, y):
	while y > 0:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y / gcd(x, y)
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x == 0:
		x += 1
	if y // x < 2:
		l = -1
		m = -1
	else:
		l = x
		m = 2 * x
	print(l, m)


def lcmProblem(l, r):
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)
t = int(input())
for j in range(t):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	lcmProblem(l, r)


def gcd(a, b):
	if a > b:
		(a, b) = (b, a)
	if b % a == 0:
		return a
	return gcd(a, b % a)

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(int(input())):
	(a, b) = list(map(int, input().strip().split()))
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


a = int(input())
for i in range(a):
	(b, c) = input().split()
	if int(b) * 2 > int(c):
		print(-1, -1)
	else:
		print(int(b), int(b) * 2)


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
tc = int(input())
for _ in range(tc):
	(x, y) = map(int, input().split())
	if x * 2 > y:
		print(-1, -1)
	else:
		print(x, 2 * x)


import sys
readline = sys.stdin.buffer.readline

def even(n):
	return 1 if n % 2 == 0 else 0
query = int(readline())
for _ in range(query):
	(l, r) = map(int, readline().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	(l, r) = MI()
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


for _ in range(int(input())):
	(l_, r) = map(int, input().split())
	y = l_ * 2
	if y > r:
		print('-1 -1')
	else:
		print(l_, y)


q = int(input())
for o in range(q):
	(a, b) = map(int, input().split())
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)


from __future__ import division, print_function
import os, sys
import math
import collections
from itertools import permutations
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

def primeFactors(n):
	j = []
	while n % 2 == 0:
		j.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			j.append(int(n))
			n = n / i
	if n > 2:
		j.append(int(n))
	return j

def sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def question(a, n):
	j = a
	for i in range(n):
		if a[i] == '1':
			j[i] = '0'
		else:
			j[i] = '1'
	j[0, n - 1].reverse()
	return j

def main():
	for _ in range(ii()):
		(l, r) = mi()
		if l * 2 > r:
			print(-1, -1)
		else:
			print(l, l * 2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	(l, r) = [int(x) for x in input().split()]
	ok = False
	if l * 2 <= r:
		print('{} {}'.format(l, l * 2))
	else:
		print('-1 -1')


def lcm(x, y):
	res = (-1, -1) if y < 2 * x else (x, 2 * x)
	return ' '.join((str(i) for i in res))
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	print(lcm(x, y))


n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	if x * 2 > y:
		print('-1 -1')
	else:
		print(f'{x} {x * 2}')


T = int(input())
for _ in range(T):
	(l, r) = list(map(int, input().split()))
	s = []
	flag = 0
	if 2 * l in range(l, r + 1):
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
n = int(input())
arr = []
for i in range(n):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		arr.append([-1, -1])
	else:
		arr.append([l, 2 * l])
for i in range(len(arr)):
	print(arr[i][0], arr[i][1])


t = int(input())
for _ in range(t):
	a = input().split()
	l = int(a[0])
	r = int(a[1])
	if 2 * l > r:
		print('{} {}'.format(-1, -1))
	else:
		print('{} {}'.format(l, 2 * l))


for i in [*open(0)][1:]:
	(a, b) = map(int, i.split())
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)


t = int(input())
final = []
for j in range(t):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if 2 * l > r:
		final.append(-1)
		final.append(-1)
	else:
		final.append(l)
		final.append(2 * l)
for i in range(t):
	print(final[2 * i], final[2 * i + 1])


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	(l, r) = R()
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)


import sys
import math
from collections import Counter
import heapq
try:
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		x = l
		y = l * 2
		if y > r:
			print(-1, -1)
		else:
			print(x, y)
except:
	pass


f = lambda : map(int, input().split())
for _ in range(int(input())):
	(l, r) = f()
	if min(l, r) * 2 > max(l, r):
		print(-1, -1)
	else:
		print(min(l, r), 2 * min(l, r))


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(l, r):
	if l * 2 <= r:
		return str(l) + ' ' + str(l * 2)
	return str(-1) + ' ' + str(-1)
for t in range(0, tests):
	(l, r) = list(map(int, readline().split(' ')))
	print(solve(l, r))


def l_cm(x, y):
	mul = x * y
	while y:
		(x, y) = (y, x % y)
	return mul // x
T = int(input())
for _ in range(T):
	(l, r) = map(int, input().split())
	flag = True
	i = l
	n = r // l
	if n > 1:
		print(i, end=' ')
		print(i * 2)
	else:
		print(-1, end=' ')
		print(-1)


n = int(input())
s = []
for i in range(n):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	x = l
	y = l * 2
	if y <= r:
		s.append([x, y])
	else:
		s.append([-1, -1])
for j in range(len(s)):
	print(*s[j])


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return False
for _ in range(int(input())):
	(l, r) = getNM()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	z1 = 2 * a
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = len(li) - 1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt

def knapsack(li, sumi, s, n, dp):
	if s == sumi // 2:
		return 1
	elif n == 0:
		return 0
	elif dp[n][s] != -1:
		return dp[n][s]
	else:
		if li[n - 1] <= s:
			dp[n][s] = knapsack(li, sumi, s - li[n - 1], n - 1, dp) or knapsack(li, sumi, s, n - 1, dp)
		else:
			dp[n][s] = knapsack(li, sumi, s, n - 1, dp)
		return dp[n][s]
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if r < l + l:
		print(-1, -1)
	else:
		print(l, 2 * l)


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	(l, r) = IP()
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)
	return
t = II()
for i in range(t):
	solve()


a = int(input())
i = 0
while i < a:
	b = input().split(' ')
	g = int(b[0])
	f = int(b[1])
	if f >= 2 * g:
		print(g, 2 * g)
	else:
		print(-1, -1)
	i = i + 1


import math
num_cases = int(input())
for _ in range(num_cases):
	(x, y) = list(map(int, input().strip().split()))
	if y < 2 * x:
		print('-1 -1')
	else:
		print('{} {}'.format(x, 2 * x))


import math
from sys import stdin, stdout
from collections import defaultdict
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if r // l < 2:
		print(-1, -1)
	else:
		print(l, l * 2)


from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
import os
import sys
from io import BytesIO, IOBase
import math
import bisect
from math import inf
import random
ins = lambda : [int(x) for x in input()]
inp = lambda : int(input())
inps = lambda : [int(x) for x in input().split()]
from fractions import Fraction as F
md = pow(10, 9) + 7

def main():
	n = inp()
	for _ in range(n):
		(l, r) = inps()
		if l == 1:
			print(1, 2)
			continue
		if r < l * 2:
			print(-1, -1)
			continue
		print(l, l * 2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdout, stdin
(_input, _print) = (stdin.readline, stdout.write)
(_range, _int) = (range, int)

def solution():
	for _ in _range(_int(_input())):
		(l, r) = [_int(i) for i in _input().split()]
		if l * 2 <= r:
			print(l, l * 2)
		else:
			print(-1, -1)
solution()


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	(l, r) = list(map(int, input().split()))
	if l + l > r:
		print(-1, -1)
	else:
		print(l, l + l)
t = int(input())
for i in range(0, t):
	main()


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def a():
	(l, r) = vars()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)

def b():
	(n, k, z) = vars()
	arr = array()
	s = 0
	stack = []
	left = []
	for i in range(k + 1):
		s += arr[i]
		stack.append(arr[i])
		if i > 0:
			left.append(2 * arr[i] + arr[i - 1])
	j = left.index(max(left))
	ans = arr[0]
	i = 1
	while k > 0 and i < n:
		ans += arr[i]
		k -= 1
		if i > 0 and z > 0:
			if i > j and len(stack) >= 2 and (k >= 2):
				ns = s - stack[-1] - stack[-2]
				if ns + arr[i - 1] + arr[i] > s:
					ans += arr[i] + arr[i - 1]
					s = ans + ns
					stack.pop(-1)
					stack.pop(-1)
					k -= 2
					z -= 1
					continue
			elif stack and k == 1:
				if arr[i - 1] > stack[-1]:
					ans += arr[i - 1]
					k -= 1
					z -= 1
		i += 1
	print(ans)
t = int(input())
for _ in range(t):
	a()


t = int(input())

def main():
	(l, r) = [int(x) for x in input().split(' ')]
	if l * 2 > r:
		print('-1 -1')
	else:
		print(f'{l} {l * 2}')
for _ in range(t):
	main()


import math
import os
import random
import re
from sys import *
from collections import *

def solve():
	for _ in range(int(stdin.readline())):
		(l, r) = map(int, stdin.readline().strip().split())
		if r >= 2 * l:
			print(l, 2 * l)
		else:
			print(-1, -1)
solve()


import math
t = int(input())
for i in range(t):
	lcm = 0
	(l, r) = map(int, input().split())
	lcm = 2 * l
	if lcm >= l and lcm <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def lcmProblem(l, r):
	x = l
	y = 2 * l
	if y > r:
		print(-1, -1)
	else:
		print(x, y)
n = int(input())
for i in range(n):
	line = list(map(int, input().split()))
	l = line[0]
	r = line[1]
	lcmProblem(l, r)


import math
t = int(input())
for _ in range(t):
	(l, r) = [int(a) for a in input().split()]
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
T = int(input())
for i in range(T):
	(l, r) = map(int, input().split())
	d = False
	if l <= r // 2:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(l, r) = int_array()
	x = l * 2
	if r >= x:
		print(l, x)
	else:
		print(-1, -1)


from math import *
t = int(input())
while t:
	t = t - 1
	(l, r) = map(int, input().split())
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import math
n = int(input())
for i in range(n):
	(l, r) = [int(x) for x in input().split()]
	if 2 * l > r:
		print('-1 -1')
	else:
		print(l, 2 * l)


def solve(l, r):
	if 2 * l <= r:
		return [l, 2 * l]
	return [-1, -1]

def main(istr, ostr):
	t = int(istr.readline())
	for _ in range(t):
		(l, r) = list(map(int, istr.readline().strip().split()))
		result = solve(l, r)
		print(*result, file=ostr)
import sys
main(sys.stdin, sys.stdout)


test = int(input())
while test:
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print('{} {}'.format(-1, -1))
	else:
		print('{} {}'.format(l, 2 * l))
	test -= 1


def findpair(l, r):
	ans1 = l
	ans2 = 2 * l
	s = ''
	if ans2 > r:
		s = s + '-1' + ' ' + '-1'
	else:
		s = s + str(ans1) + ' ' + str(ans2)
	return s
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	print(findpair(l, r))


def func(a, b):
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	func(a, b)


def lcm(l, r):
	if r >= 2 * l:
		return (l, 2 * l)
	else:
		return (-1, -1)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	tup = lcm(l, r)
	print(tup[0], tup[1])


def solution(inferiorLimit, superiorLimit):
	firstOption = inferiorLimit
	secondOption = 2 * inferiorLimit
	if secondOption > superiorLimit:
		print(-1, -1)
	else:
		print(firstOption, secondOption)
tests = int(input())
for x in range(tests):
	numbers = list(map(int, input().split(' ')))
	superiorLimit = numbers[1]
	inferiorLimit = numbers[0]
	solution(inferiorLimit, superiorLimit)


def solution():
	(l, r) = list(map(int, input().split()))
	if 2 * l <= r:
		print(f'{l} {2 * l}')
		return
	print('-1 -1')
t = int(input())
for _ in range(t):
	solution()


t = int(input())
for i in range(t):
	d = input()
	d = d.split()
	(l, r) = (int(d[0]), int(d[1]))
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


t = int(input())
ans = []
for i in range(t):
	(num1, num2) = tuple(map(int, input().split()))
	found = False
	if num1 * 2 <= num2:
		for j in range(num1, num2 + 1):
			if j * 2 <= num2:
				found = True
				break
	if found == True:
		ans.append([j, j * 2])
	else:
		ans.append([-1, -1])
for case in tuple(ans):
	print(case[0], case[1])


T = int(input())
for t in range(T):
	(n, m) = [int(i) for i in input().split()]
	if m < 2 * n:
		print(-1, -1)
	else:
		print(n, 2 * n)


import sys
from sys import stdin
import math

def iinput():
	return int(input())

def minput():
	return map(int, input().split())

def linput():
	return list(map(int, input().split()))

def fiinput():
	return int(stdin.readline())

def fminput():
	return map(int, stdin.readline().strip().split())

def flinput():
	return list(map(int, stdin.readline().strip().split()))
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	elif 2 * (l + 1) <= r:
		print(l + 1, 2 * (l + 1))
	else:
		print(-1, -1)


def solve():
	(l, r) = map(int, input().split())
	if l + l <= r:
		print(l, l + l)
	else:
		print(-1, -1)
t = int(input())
for _ in range(t):
	solve()


import math

def lcm(x, y):
	return abs(x * y) // math.gcd(x, y)

def solve(l, r):
	for x in range(l, r // 2 + 1):
		for y in range(x * 2, r + 1):
			if l <= lcm(x, y) <= r:
				return '%d %d' % (x, y)
	return '-1 -1'
for _ in range(int(input())):
	print(solve(*list(map(int, input().split(' ')))))


import sys
t = int(input())
for i in range(t):
	(n, k) = list(map(int, sys.stdin.readline().strip().split()))
	if 2 * n <= k:
		print(n, 2 * n)
	else:
		print(-1, -1)


def sol():
	(l, r) = list(map(int, input().split()))
	if r - l < l:
		return [-1, -1]
	elif l * 2 <= r:
		return [l, l * 2]
	else:
		return [-1, -1]
for t in range(int(input())):
	result = sol()
	print(result[0], result[1])


t = int(input())
for tt in range(t):
	(l, r) = map(int, input().split())
	ok = False
	if l * 2 <= r:
		print(l, l * 2)
		ok = True
	if not ok:
		print(-1, -1)


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	(l, r) = iia()
	if l * 2 <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


t = int(input())
for i in range(t):
	(l, r) = [int(x) for x in input().split()]
	x = l
	y = l + 1
	rem = y % x
	if rem == 0:
		print(x, y)
	else:
		y = y + x - rem
		if y > r:
			print(-1, -1)
		else:
			print(x, y)


import sys

def get_ints():
	return map(int, I().split())

def get_list():
	return list(map(int, I().split()))

def I():
	return sys.stdin.readline().strip()
for t in range(int(I())):
	(l, r) = get_ints()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


t = int(input())
from math import *
from sys import *
from math import *

def f(arr, k, x):
	count = 0
	for il in arr:
		count += il // x
	if count >= k:
		return True
	else:
		return False
for ip in range(t):
	(n, m) = [int(x) for x in input().strip().split()]
	if n * 2 <= m:
		print(n, 2 * n)
	else:
		print(-1, -1)


import math
for i in range(int(input())):
	z = input().split()
	l = int(z[0])
	r = int(z[1])
	go = True
	index1 = -1
	index2 = -1
	if l * 2 <= r:
		index1 = l
		index2 = l * 2
	print(index1, index2)


for __ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if a * 2 <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


from collections import defaultdict, Counter
from math import log, ceil, floor

def solve():
	(a, b) = list(map(int, input().split()))
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
ans = []
for i in range(t):
	(n, m) = [int(i) for i in input().split()]
	if n * 2 <= m:
		ans.append((n, n * 2))
	else:
		ans.append((-1, -1))
for i in ans:
	print(i[0], i[1])


repetitions = int(input())
while repetitions > 0:
	lr = input().split()
	l = int(lr[0])
	r = int(lr[1])
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)
	repetitions -= 1


num_tests = int(input())
tests = []
for i in range(num_tests):
	tests.append([int(x) for x in input().split()])
for t in tests:
	(l, r) = t
	if 2 * l <= r:
		print(f'{l} {2 * l}')
	else:
		print('-1 -1')


a = int(input())
for x in range(a):
	(b, c) = map(int, input().split())
	if 2 * b <= c:
		print(b, 2 * b)
	else:
		print(-1, -1)


import random

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if r < 2 * l:
		print(-1, -1)
	else:
		print(l, 2 * l)


import math
while True:
	try:
		t = int(input())
		for i in range(t):
			(l, r) = map(int, input().split())
			if 2 * l > r:
				print(-1, -1)
			else:
				print(l, 2 * l)
	except EOFError:
		break


t = input()
t = int(t)
while t > 0:
	(n, m) = input().split()
	(n, m) = (int(n), int(m))
	x = n
	y = n * 2
	if y > m:
		print(-1, -1)
	else:
		print(x, y)
	t -= 1


t = int(input())
for _ in range(t):
	(l, r) = [int(s) for s in input().split()]
	if r < l + l:
		print(-1, -1)
	else:
		print(l, l + l)


def gcd(n1, n2):
	if n1 == 0:
		return n2
	return gcd(n2 % n1, n1)

def lcm(n1, n2):
	return n1 * n2 // gcd(n1, n2)
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	x = l
	y = 2 * x
	if lcm(x, y) < l and lcm(x, y) > r and (y < x) and (x < l) and (y > r):
		x -= 1
		y -= 1
	if lcm(x, y) < l or lcm(x, y) > r or y < x or (x < l) or (y > r):
		x = -1
		y = -1
	print(x, y)


reps = int(input())
res = []
while reps != 0:
	(l, r) = map(int, input().split(' '))
	if r < 2 * l:
		print('-1 -1')
	else:
		print(l, 2 * l)
	reps -= 1


import sys
from math import sqrt, gcd, ceil, log
from collections import defaultdict, Counter, deque
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))

def main():
	for _ in range(int(input())):
		(l, r) = read()
		if l * 2 <= r:
			print(l, l * 2)
		else:
			print(-1, -1)
main()


from math import gcd

def lcm(x, y):
	return x * y / gcd(x, y)

def lcmc(l, r):
	if r - l < l:
		return [-1, -1]
	else:
		return (l, 2 * l)
for _ in range(int(input())):
	(l, r) = input().split()
	xy = lcmc(int(l), int(r))
	print(xy[0], xy[1])


from sys import stdin, exit, setrecursionlimit
from collections import deque
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	(a, b) = mi()
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	(a, b) = [int(i) for i in input().split()]
	c = a * 2
	if c <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(l, m) = map(int, input().split())
	if 2 * l <= m:
		print('{} {}'.format(l, 2 * l))
	else:
		print('-1 -1')


def lcm(a, b):
	m = a * b
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return m // (a + b)
g = int(input())
for i in range(g):
	a = [int(s) for s in input().split()]
	if a[0] * 2 > a[1]:
		print(-1, -1)
	else:
		print(a[0], a[0] * 2)


import heapq
import collections
from math import log2
import itertools
from functools import lru_cache
from sys import setrecursionlimit as srl
srl(2 * 10 ** 6)
N = 200001

def solve(l, r):
	if 2 * l > r:
		return [-1, -1]
	else:
		return [l, 2 * l]
t = int(input())
for _ in range(1, t + 1):
	(l, r) = map(int, input().split())
	print(*solve(l, r))


import math
from collections import Counter
from math import factorial as fact
from collections import defaultdict

def inpint():
	return int(input())

def inpstr():
	return str(input())

def inparr():
	return list(map(int, input().strip().split()))

def inptup():
	return map(int, input().strip().split())
for _ in range(inpint()):
	(a, b) = inptup()
	if 2 * a <= b:
		(x, y) = (a, 2 * a)
		print(x, y)
	else:
		print(-1, -1)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(x, y) = value()
	a = x
	b = x * 2
	if b > y:
		print(-1, -1)
	else:
		print(a, b)


import sys
import heapq
from collections import deque
from collections import defaultdict
I = lambda : list(map(int, input().split(' ')))
for i in range(int(input())):
	(l, r) = I()
	if 2 * l > r:
		print(-1, end=' ')
		print(-1)
	else:
		print(l, end=' ')
		print(2 * l)


t = int(input())
for _ in range(t):
	s = list(map(int, input().split()))
	x = s[0]
	if x * 2 <= s[1]:
		print('{} {}'.format(x, x * 2))
	else:
		print('-1 -1')


import sys
from math import floor as fl
from math import ceil as ce
from math import sqrt
cont = sys.stdin.readlines()
cont = [i.strip('\n').split() for i in cont]
num = int(cont.pop(0)[0])

def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	while b:
		(a, b) = (b, a % b)
	return a

def lcm(a, b):
	gc = gcd(a, b)
	return a * b // gc
for i in cont:
	found = False
	(l, r) = [int(j) for j in i]
	if 2 * l <= r:
		print(f'{l} {l * 2}')
	else:
		print('-1 -1')


t = int(input())
array = list()
for j in range(t):
	array.append(list(map(int, input().split())))
for j in range(t):
	if 2 * array[j][0] > array[j][1]:
		print(-1, -1)
	else:
		print(array[j][0], 2 * array[j][0])


import sys
input = sys.stdin.readline
import math

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().strip().split())

def from_file(f):
	return f.readline

def solve(l, r):
	if r >= 2 * l:
		print(f'{l} {2 * l}')
	else:
		print(f'-1 -1')
t = inp()
for _ in range(t):
	(l, r) = invr()
	solve(l, r)


def lcm():
	strn = input().split()
	l = int(strn[0])
	r = int(strn[1])
	if l * 2 <= r:
		return (l, l * 2)
	else:
		return (-1, -1)
for i in range(int(input())):
	p = lcm()
	print(p[0], p[1])


from collections import defaultdict as dd
import math
import sys
import string
input = sys.stdin.readline

def nn():
	return int(input())

def li():
	return list(input())

def mi():
	return map(int, input().split())

def lm():
	return list(map(int, input().split()))
q = nn()
for _ in range(q):
	(a, b) = mi()
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


t = int(input())
for _ in range(t):
	(l, r) = list(map(lambda x: int(x), input().split()))
	flag = 0
	for i in range(l, r // 2 + 1):
		if i * 2 <= r:
			print(i, i * 2)
			flag = 1
			break
	if flag == 0:
		print(-1, -1)


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	lr = stdin.readline().split()
	l = int(lr[0])
	r = int(lr[1])
	if r < 2 * l:
		stdout.write('-1 -1\n')
	else:
		stdout.write(str(l) + ' ' + str(2 * l) + '\n')


test = int(input())
result = []
for t in range(test):
	answer = []
	lr = [int(n) for n in input().split()]
	if lr[1] < 2 * lr[0]:
		answer.append(-1)
		answer.append(-1)
		result.append(answer)
	else:
		answer.append(lr[0])
		answer.append(2 * lr[0])
		result.append(answer)
for r in range(test):
	print(*result[r])


from bisect import bisect_left, bisect_right
from sys import stdin, stdout
R = lambda : stdin.readline().strip()
RL = lambda f=None: list(map(f, R().split(' '))) if f else list(R().split(' '))
output = lambda x: stdout.write(str(x) + '\n')
output_list = lambda x: output(' '.join(map(str, x)))
for tc in range(int(R())):
	(l, r) = RL(int)
	if 2 * l <= r:
		output_list([l, 2 * l])
	else:
		output_list([-1, -1])


for i in [*open(0)][1:]:
	(a, b) = map(int, i.split())
	print('-1 -1' * (a * 2 > b) or f'{a} {a * 2}')


import math
import sys
import collections
import bisect
from collections import defaultdict
from sys import stdin, stdout
MOD = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 7)

def take_root(num):
	return math.ceil(math.sqrt(num))

def sieve():
	limit = 86028121
	isprime = [1] * 86028122
	isprime[0] = 0
	isprime[1] = 0
	for i in range(2, take_root(limit + 1)):
		if isprime[i] == 1:
			for j in range(i * i, limit + 1, i):
				isprime[j] = 0
	primes = []
	for i in range(limit + 1):
		if isprime[i] == True:
			primes.append(i)
	return primes

def minput():
	return map(int, input().split())

def iinput():
	return int(input())

def strinput():
	return input()

def linput():
	return list(map(int, input().split()))
for _ in range(iinput()):
	(l, r) = minput()
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	(l, r) = read()
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
for _ in range(int(input())):
	solve()


def solve(x, y):
	if x * 2 > y:
		a = (-1, -1)
	else:
		a = (x, x * 2)
	print(a[0], end=' ')
	print(a[1])

def main():
	inp = lambda : [int(x) for x in input().split()]
	inn = lambda : int(input())
	t = inn()
	for _ in range(t):
		(x, y) = inp()
		solve(x, y)
main()


from collections import defaultdict as D
try:
	t = int(input())
	for i in range(t):
		(x, y) = map(int, input().split())
		flag = 0
		if 2 * x > y:
			flag = 1
		if flag == 0:
			print(x, 2 * x)
		else:
			print(-1, -1)
except:
	pass


from collections import defaultdict
import math

def solve(a, b):
	a1 = a
	b1 = 2 * a
	if a <= a1 <= b and a <= b1 <= b:
		return (a1, b1)
	return (-1, -1)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(a1, a2) = solve(a, b)
	print(a1, a2)


from math import gcd

def lcm(a, b):
	return a * b / gcd(a, b)

def findingxy(l, r):
	x = l
	y = x * 2
	if lcm(x, y) <= r:
		return (x, y)
	return (-1, -1)
for i in range(int(input())):
	(l, r) = list(map(int, input().split()))
	(x, y) = findingxy(l, r)
	print(x, y)


import sys
import math
from collections import defaultdict

def main():
	(l, r) = list(map(int, input().split()))
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
for i in range(int(input())):
	main()


for i in [*open(0)][1:]:
	(l, r) = map(int, i.split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


import math

def solve():
	(a, b) = list(map(int, input().split()))
	if a * 2 <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


from math import gcd

def lcm(x, y):
	return abs(x * y) // gcd(x, y)
t = int(input())
a = []
for _ in range(t):
	(l, r) = list(map(int, input().split()))
	if 2 * l > r:
		print('-1', '-1')
	else:
		print(l, 2 * l)


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def calculate_sum(a, N):
	m = N / a
	sum = m * (m + 1) / 2
	ans = a * sum
	return ans

def series(N):
	return N * (N + 1) // 2

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def LCM(x, y):
	return x * y // GCD(x, y)

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def isprime(n):
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	(l, r) = spin()
	flag = 0
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)


n = int(input())
for i in range(n):
	(p, q) = map(int, input().split())
	if p * 2 <= q:
		print(p, 2 * p)
	else:
		print(-1, -1)


for itr in range(int(input())):
	(l, m) = list(map(int, input().split()))
	if 2 * l <= m:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def Golomb(n):
	dp = [0] * (n + 1)
	dp[1] = 1
	for i in range(2, n + 1):
		dp[i] = 1 + dp[i - dp[dp[i - 1]]]
	return dp[1:]
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	(l, r) = list(map(int, stdin.readline().rstrip().split()))
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


q = int(input())
for i in range(1, q + 1):
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if r >= l * 2:
		print('{} {}'.format(l, l * 2))
	else:
		print('-1 -1')


II = lambda : int(input())
JJ = lambda : list(map(int, input().split()))
for i in range(II()):
	(l, r) = JJ()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		(l, r) = ain()
		if 2 * l > r:
			print(-1, -1)
		elif 2 * l == r:
			print(l, r)
		else:
			print(l, 2 * l)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for i in range(t):
	arr = input().split(' ')
	a = int(arr[0])
	b = int(arr[1])
	if 2 * a > b:
		print('-1 -1')
	else:
		print(str(a) + ' ' + str(2 * a))


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_a(tp):
	return list(r_t(tp))

def main():
	cases = int(r())
	for case in range(cases):
		(a, b) = r_t(int)
		print('-1 -1' if 2 * a > b else str(a) + ' ' + str(2 * a))
main()


for t in range(int(input())):
	(l, r) = list(map(int, input().strip().split()))
	flag = 0
	if l * 2 <= r:
		print('{} {}'.format(l, l * 2))
	else:
		print('-1 -1')


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import defaultdict
from pprint import pprint

def main():
	(l, r) = map(int, input().split())
	x = y = l
	if r < l * 2:
		print(-1, -1)
	else:
		print(l, 2 * l)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	main()


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print('-1 -1')
	else:
		while True:
			if 2 * l <= r:
				break
			l += 1
		print(l, end=' ')
		print(2 * l)


def solve():
	arr = [int(i) for i in input().split()]
	l = arr[0]
	r = arr[1]
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print(-1, -1)
test = int(input())
while test:
	solve()
	test -= 1


def lcm_prob(l, r):
	if l * 2 <= r:
		ans = [l, l * 2]
	else:
		ans = [-1, -1]
	return ans
t = int(input())
for _ in range(t):
	lr = input().split()
	l = int(lr[0])
	r = int(lr[1])
	result = lcm_prob(l, r)
	print(*result, sep=' ')


from math import *
t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	if m < 2 * n:
		print(-1, -1)
	else:
		print(n, 2 * n)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
from itertools import accumulate
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	(l, r) = li()
	ans = [-1, -1]
	for i in range(l, r + 1):
		if l * 2 <= r:
			ans = [i, 2 * i]
			break
		else:
			break
	print(*ans)


def get_int():
	from sys import stdin
	return int(stdin.readline().replace('\n', ''))

def get_int_list():
	from sys import stdin
	return [int(x) for x in stdin.readline().replace('\n', '').split(' ')]

def _print(_list):
	for e in _list:
		print(str(e[0]) + ' ' + str(e[1]))

def lcm_prob(l, r):
	x = l
	y = 2 * x
	return [x, y] if y <= r else [-1, -1]
t = get_int()
output = []
for i in range(t):
	(l, r) = get_int_list()
	output += [lcm_prob(l, r)]
_print(output)


import io, os
from collections import deque
import bisect
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	(l, r) = RL()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


for x in range(int(input())):
	(h, m) = list(map(int, input().split()))
	if 2 * h > m:
		print(-1, -1)
	else:
		print(h, 2 * h)


inp = lambda : map(int, input().split(' '))
(t,) = inp()
for _ in range(t):
	(l, m) = inp()
	if 2 * l > m:
		print('-1 -1')
	else:
		print('{} {}'.format(l, 2 * l))


from math import ceil
t = int(input())
for i in range(t):
	(l, r) = [int(x) for x in input().strip().split()]
	if r >= 2 * l:
		print(l, 2 * l)
	else:
		print(-1, -1)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	f = False
	if x <= x * 2 <= y:
		print(x, 2 * x)
	else:
		print(-1, -1)


import sys
input = iter(sys.stdin.read().splitlines()).__next__

def solve(L, R):
	if 2 * L > R:
		return (-1, -1)
	return (L, 2 * L)
TC = int(input())
for tc in range(TC):
	(L, R) = map(int, input().split())
	res = solve(L, R)
	print('%d %d' % res)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	(n, m) = mInt()
	if 2 * n <= m:
		print(n, 2 * n)
	else:
		print(-1, -1)


from math import sqrt
t = int(input())
for o in range(0, t):
	(a, b) = map(int, input().split(' '))
	if a * 2 <= b:
		print('{} {}'.format(a, a * 2))
	else:
		print('-1 -1')


x = int(input())
for i in range(0, x):
	(n, m) = [int(a) for a in input().split()]
	if n * 2 <= m:
		print(n, n * 2)
	else:
		print(-1, -1)


from sys import stdin
from math import ceil, gcd

def func():
	return
for _ in range(int(stdin.readline())):
	(l, r) = map(int, stdin.readline().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


n = int(input())
for i in range(n):
	entrada = input().split(' ')
	l = int(entrada[0])
	r = int(entrada[1])
	x = l
	y = l * 2
	if y <= r:
		print(x, y)
	else:
		print('-1 -1')


def compute_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def compute_lcm(x, y):
	lcm = x * y // compute_gcd(x, y)
	return lcm
t = int(input())
for _ in range(t):
	(l, r) = [int(x) for x in input().split(' ')]
	ans = True
	if l * 2 <= r:
		print(l, l * 2)
	else:
		print('-1 -1')


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(1, itg() + 1):
	(a, b) = mpint()
	if a + a <= b:
		print(a, a + a)
	else:
		print(-1, -1)


def GCD(x, y):
	if x == 0:
		return y
	return GCD(y % x, x)
ni = int(input())
for ki in range(ni):
	(l, r) = map(int, input().split())
	g = GCD(l, r)
	if l * 2 <= r:
		print(l, l * 2)
		continue
	print(-1, -1)


t = int(input())
list1 = []
for i in range(t):
	(l, y) = input().split()
	l = int(l)
	y = int(y)
	if l * 2 <= y:
		list1.append([l, l * 2])
	else:
		list1.append([-1, -1])
for i in range(len(list1)):
	print(*list1[i], sep=' ')


import sys
input = sys.stdin.buffer.readline

def prog():
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		if 2 * l > r:
			sys.stdout.write('-1 -1\n')
		else:
			sys.stdout.write(f'{l} {2 * l}\n')
prog()


for _ in range(int(input())):
	(l, r) = map(int, input().split())
	c = 0
	while 2 * l < r + 1:
		if 2 * l <= r:
			print(l, l * 2)
			c = 1
			break
		l += 1
	if c == 0:
		print('-1 -1')


def main():
	t = int(input())
	ans = []
	for i in range(t):
		(l, r) = map(int, input().split())
		if r < 2 * l:
			ans.append(str(-1) + ' ' + str(-1))
		else:
			ans.append(str(l) + ' ' + str(2 * l))
	print('\n'.join(ans))
main()


for _ in range(int(input())):
	(l, r) = input().split()
	(l, r) = (int(l), int(r))
	(lr, rr) = (-1, -1)
	if l * 2 <= r:
		(lr, rr) = (l, l * 2)
	print(lr, rr)


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	(l, r) = mdata()
	(a, b) = (-1, -1)
	if 2 * l <= r:
		(a, b) = (l, 2 * l)
	print(a, b)


t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	if l == 1:
		print(1, 2)
	elif r - l == 1:
		print(-1, -1)
	elif r - l >= l:
		print(l, 2 * l)
	elif r - l < l:
		print(-1, -1)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(L, R) = [int(x) for x in input().split()]
		if L * 2 <= R:
			print(L, L * 2)
		else:
			print(-1, -1)
main()


for t in range(int(input())):
	data = input().split()
	l = int(data[0])
	r = int(data[1])
	flag = 0
	if r >= 2 * l:
		print(l, 2 * l, sep=' ')
	else:
		print(-1, -1, sep=' ')


def list_input():
	return list(map(int, input().split()))

def multiple_input():
	return map(int, input().split())
for _ in range(int(input())):
	(a, b) = multiple_input()
	if b < 2 * a:
		print(-1, -1)
	else:
		print(a, 2 * a)


T = int(input())
while T:
	(L, R) = map(int, input().split())
	x = L
	y = 2 * L
	if y > R:
		print(-1, -1)
	else:
		print(x, y)
	T = T - 1


t = int(input())
for T in range(t):
	(l, r) = map(int, input().split())
	done = 0
	if r - l <= 1 and l != 1:
		print(-1, -1)
		continue
	elif 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


q = int(input())
for _ in range(q):
	(l, r) = map(int, input().split())
	rr = l * 2
	if rr <= r:
		print(l, rr)
	else:
		print(-1, -1)


from sys import stdin, stdout
q = int(input())
for i in range(q):
	(l, r) = list(map(int, stdin.readline().split()))
	if r >= 2 * l:
		print(l, l * 2)
	else:
		print(-1, -1)


import sys, math, cmath, time
start_time = time.time()

def solve():
	(l, r) = invr()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


def a(c):
	if c != 'z':
		return chr(ord(c) + 1)
	else:
		return 'a'

def b(ca):
	ca1 = []
	for i in range(len(ca)):
		ca1.append(a(ca[i]))
	return ca1
n = int(input())
for i in range(n):
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


def solution(l, r):
	if r < 2 * l:
		return (-1, -1)
	else:
		return (l, 2 * l)
t = int(input())
for _ in range(t):
	(l, r) = tuple(map(int, input().split(' ')))
	s = solution(l, r)
	print(s[0], s[1])


import bisect
import math
import heapq
import random

def unpack(func=int):
	return map(func, input().split())

def l_unpack(func=int):
	return list(map(func, input().split()))

def s_unpack(func=int, rev=False):
	return sorted(map(func, input().split()), reverse=rev)

def ml_unpack(n):
	return [int(input()) for _ in range(n)]

def range_n():
	return range(int(input()))

def getint():
	return int(input())

def counter(a):
	d = {}
	for x in a:
		if x in d:
			d[x] += 1
		else:
			d[x] = 1
	return d

def main():
	for _ in range_n():
		(l, r) = unpack()
		x = l
		y = 2 * x
		if l <= x < y <= r:
			print(x, y)
		else:
			print(-1, -1)
main()


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	(a, b) = rm()
	if 2 * a <= b:
		print(a, 2 * a)
	else:
		print(-1, -1)


def lcm(a, b):
	import math
	g = math.gcd(a, b)
	return a * b // g
for i in range(int(input())):
	(l, r) = map(int, input().split())
	if r - l >= l:
		print(l, l * 2)
	else:
		print(-1, -1)


t = int(input())
for _ in range(t):
	(l, r) = [int(x) for x in input().strip().split()]
	f = 0
	x = l
	if x * 2 <= r:
		y = x * 2
	else:
		x = -1
		y = -1
	print('{} {}'.format(x, y))


testcases = int(input())
for i in range(testcases):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if b - a >= a:
		print(a, end=' ')
		print(2 * a)
	else:
		print('-1 -1')


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	(l, r) = MAP()
	c = 2 * l
	if c <= r:
		print(l, c)
	else:
		print(-1, -1)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	(a, b) = MI()
	if a * 2 > b:
		print(-1, -1)
	else:
		print(a, a * 2)


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	lcm = x * y // gcd(x, y)
	return lcm

def solution():
	for i in range(Int()):
		(L, R) = Mint()
		if 2 * L <= R:
			print(L, 2 * L)
		else:
			print(-1, -1)
solution()


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()
for _ in range(INT()):
	(l, r) = MAP()
	n = l * 2
	if n <= r:
		print(l, n)
	else:
		print(-1, -1)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	v = a * 2
	if v >= a and v <= b:
		print(a, v)
	else:
		print(-1, -1)


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
for case in range(int(input())):
	(l, r) = [int(x) for x in input().split()]
	if l * 2 in range(l, r + 1):
		print(l, l * 2)
	elif l * (l + 1) in range(l, r + 1):
		print(l, l + 1)
	else:
		print(-1, -1)


for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	e = min(a, b)
	f = max(a, b)
	if 2 * e > f:
		print(-1, -1)
	else:
		print(e, 2 * e)


t = int(input())
a = tuple((tuple(map(int, input().split())) for i in range(t)))
for i in range(t):
	if 2 * a[i][0] <= a[i][1]:
		print(str(a[i][0]) + ' ' + str(2 * a[i][0]))
	else:
		print('-1 -1')


n = int(input())
for i in range(n):
	(e, d) = map(int, input().split())
	if e * 2 <= d:
		print(e, e * 2)
	else:
		print('-1 -1')


test = int(input())
while test != 0:
	test = test - 1
	(a, b) = map(int, input().split())
	if a * 2 > b:
		print('-1 -1')
	else:
		print(str(a) + ' ' + str(2 * a))


def main():
	test = int(input())
	for _ in range(test):
		(l, r) = map(int, input().split())
		if 2 * l > r:
			print(-1, -1)
		else:
			print(l, 2 * l)
main()


def lc(l, r):
	if 2 * l > r:
		return [-1, -1]
	else:
		return [l, 2 * l]
t = int(input())
for _ in range(t):
	(l, r) = map(int, input().split())
	res = lc(l, r)
	print(*res)


test = int(input())
answer = []
ip = []

def tester(left, right):
	ans = [0, 0]
	if right < 2 * left:
		ans[0] = -1
		ans[1] = -1
		return ans
	else:
		ans[0] = left
		ans[1] = 2 * left
		return ans
for i in range(0, test):
	inpt = input().split()
	inpt = list(map(int, inpt))
	ip.append(inpt)
for j in range(0, test):
	awer = tester(ip[j][0], ip[j][1])
	answer.append(awer)
for k in range(0, test):
	print(*answer[k])


from math import ceil
from sys import stdin, stdout, setrecursionlimit
from random import randint

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	if l * 2 * l // gcd(l, l * 2) <= r and l * 2 <= r:
		print(l, l * 2)
	else:
		print('-1 -1')


def function(n, m):
	if 2 * n > m:
		return (-1, -1)
	else:
		return (n, 2 * n)
t = int(input())
while t:
	(n, m) = map(int, input().rstrip().split())
	print(*function(n, m))
	t -= 1


import sys

def lcmp(l, r):
	y = l * 2
	if y > r:
		return '-1 -1'
	else:
		return f'{l} {y}'
cases = int(sys.stdin.readline())
for i in range(cases):
	line = list(map(int, sys.stdin.readline().split(' ')))
	ans = lcmp(line[0], line[1])
	sys.stdout.write(ans + '\n')


t = int(input())
while t > 0:
	(n1, n2) = map(int, input().split())
	if n1 * 2 > n2:
		print('-1 -1')
	else:
		print(n1, end=' ')
		print(n1 * 2)
	t = t - 1


def nod(a, b):
	(a, b) = (max(a, b), min(a, b))
	while b != 0:
		(a, b) = (b, a % b)
	return a if a != 0 else b

def lcm(a, b):
	return a * b // nod(a, b)

def solve(l, r):
	pass
t = int(input())
for i in range(t):
	(l, r) = map(int, input().split())
	if 2 * l > r:
		print(-1, -1)
	else:
		print(l, 2 * l)


t = int(input())
for i in range(t):
	lr = input()
	(l, r) = lr.split()
	l = int(l)
	r = int(r)
	if 2 * l > r:
		print('-1 -1')
	else:
		print(l, 2 * l, sep=' ')


n = int(input())
k = []
for i in range(n):
	(a, b) = map(int, input().split())
	if 2 * a > b:
		k.append([-1, -1])
	else:
		k.append([a, 2 * a])
for i in k:
	print(i[0], i[1])


from sys import stdin

def main():
	res = stdin.read().splitlines()[1:]
	for (i, s) in enumerate(res):
		(l, r) = map(int, s.split())
		y = l * 2
		res[i] = '-1 -1' if y > r else f'{l} {y}'
	print('\n'.join(res))
main()


for i in range(int(input())):
	(l, r) = list(map(int, input().split()))
	if (r - l > 1 or l == 1) and l * 2 <= r:
		print(f'{l} {l * 2}')
	else:
		print('-1 -1')


t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().strip().split()))
	if a * 2 <= b:
		print(a, a * 2)
	else:
		print(-1, -1)


def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	(l, r) = mi()
	if 2 * l <= r:
		print(l, 2 * l)
	else:
		print(-1, -1)


T = int(input())
for i in range(0, T):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x * 2 <= y:
		print(x, x * 2)
	else:
		print('-1 -1')


for i in range(int(input())):
	(l, r) = map(int, input().split())
	outx = 0
	outy = 0
	if 2 * l > r:
		pass
	else:
		for i in range(l, r + 1):
			z = 2 * i
			if z <= r:
				outx = i
				outy = z
				break
	if outx == 0 and outy == 0:
		print(-1, -1, sep=' ')
	else:
		print(outx, outy, sep=' ')


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	a = n
	b = n * 2
	if b > m:
		a = -1
		b = -1
	print(a, b)


import math
n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if y < x * 2:
		print(-1, -1)
	else:
		print(x, x * 2)


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	(l, r) = map(int, stdin.readline().split())
	if r // l < 2:
		print(-1, -1)
		continue
	print(l, l * 2)


def great(a, b):
	if a == 0:
		return b
	return great(b % a, a)

def LCM(a, b):
	return a * b / great(a, b)
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	x = -1
	y = -1
	if 2 * l <= r:
		x = l
		y = 2 * l
	print(x, y)


num_test = int(input())
while num_test:
	(l, r) = input().split()
	(l, r) = map(int, [l, r])
	if l * 2 > r:
		print(-1, -1)
	else:
		print(l, l * 2)
	num_test -= 1


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		if l * 2 <= r:
			print('%d %d' % (l, 2 * l))
		else:
			print('-1 -1')
main()


from sys import stdin, stdout
import math

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
t = int(stdin.readline())
for _ in range(t):
	(l, r) = list(map(int, stdin.readline().split()))
	(x, y) = (l, 2 * l)
	if y <= r:
		print(x, y)
	else:
		print(-1, -1)