P8428 [HackerEarth] appu and sugarcane farm
普及
题目描述

As you know Appu created aversion to Maths after that maths problem given by his teacher.So he stopped studying and began to do farming. He has some land where he starts growing sugarcane. At the end of the season he grew N sugarcanes. Is Appu satisfied??. No,
He wants all his sugar canes to be of the same height. He goes to the nearby market .He finds a powder which when applied to one of his sugarcanes will double the height of that sugar cane. Now he needs to find out whether is it possible to make all the sugarcanes of the same height . Oh No!! Again maths.
Please help him to find whether is it possible make all the sugar cane of the same height?

Input
First line contains N - the number of sugarcanes.Next N lines contains heights of sugarcanes seperated by space

Output
Print "YES" if it is possible make all the sugar cane of the same height or
"NO" otherwise (quotes only for clarity)

Constraints
1 ≤ N ≤ 50
Initial Height of all sugarcanes will be between 1 and 1,000,000,000, inclusive.

SAMPLE INPUT
2
1 23

SAMPLE OUTPUT
NO

输入格式

见题面

输出格式

见题面

样例输入
2 1 23 SAMPLE
样例输出
NO