Problem: This is a fact for almost all the students out there that Mathematics subject is a very fearful subject for them.

And no wonder this fact is also true for our friend Primo. But to challenge his fear he went to the Mathe-Matica Town for his summer vacations.

In Mathe-Matica town every person is assigned a Friend Score.

A Friendship Score is an integer value such that 

(i) It is unique and 

(ii) It can not be equal to Friend Score when other Friend Scores are multiplied with each-other

Now our Primo can not enjoy his vacations alone. So he asked help from the Mathe-Matica town Mayor. The Mayor gave him a Friendship Score and told him that he can be friend with two persons of town only and only if the addition of those two persons' Friend Score is equal to the Friendship Score.

Primo is not good in Mathematics so he wants your help to find out his friends in town.

Input : First line of Input contains the Number of Test Cases T .  Next T lines contain a single Integer N. N denotes the Friendship Score

Output : Output Friend Score of his friends in town. If he can not have any friend then print -1 -1 Produce output for each Test Case in a new line.

Note : Output should be in Increasing Order of Friend Scores

Constrains

1 ≤ T ≤50

2 ≤ N ≤ 10^6

Note :- To be Eligible for Prizes you have to register and create your home address maptag.

Click here to create your Maptag

SAMPLE INPUT
3
10
100
1000

SAMPLE OUTPUT
3 7
47 53
491 509

Explanation

Case 1: Friendship Score (= 10) is equal to Friend Score ( 3 + 7)

Case 2: Friendship Score (= 100) is equal to Friend Score ( 47 + 53)

Case 3: Friendship Score (= 1000) is equal to Friend Score ( 491 + 509)

Solution (in PYTHON):

Solution:
import math
def prime(n):
	if (n<=1) or (n%2==0 and n>2):
		return False
	return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))
t=int(raw_input())
ti=0
while ti<t:
	k=int(raw_input())
	d=k/2
	if k%2==0:
		f,s=d-1,d+1
	else:
		f,s=d,d+1
	while True:
		if prime(f)==True and prime(s)==True:
			print f,s
			break
		else:
			f-=1
			s+=1
		if f<=0 or s>=k:
			print -1,-1
			break
	ti+=1