Loznica is a city in Serbia, famous by history, culture, pleasant weather... and lottery! Lottery in Loznica is held with following rules:
Aljoha, the hero of our story, using some obscure utilities, managed to find out some information about the next winning ballot. Let the future combination be L_i, 1≤i≤N. Aloha managed to find out an array containing N−1 numbers, in which the ith number A_i represents the largest number which divides both L_i and L_i+1.
Now Aljoha wants to bet, and for that noble goal he needs help. Print one combination which satisfies the constraints or −1, if that kind of combination doesn't exist. If there are more combinations that satisfy given constraints, print any of them. Note that only combinations in which all numbers are strictly smaller than 1018 are valid.
First line contains number N (1≤N≤105), length of combination.
Second line contains N−1 positive integers not greater than 109, describing the information that Aljoha found out.
Print N numbers, strictly less than 1018, describing some combination which satisfies the constraints or −1 if there is no such combination.