CF299A Ksusha and Array
Description
Ksusha is a beginner coder. Today she starts studying arrays. She has array $ a_{1},a_{2},...,a_{n} $ , consisting of $ n $ positive integers.
Her university teacher gave her a task. Find such number in the array, that all array elements are divisible by it. Help her and find the number!
Input Format
The first line contains integer $ n $ $ (1
Output Format
Print a single integer — the number from the array, such that all array elements are divisible by it. If such number doesn't exist, print -1.
If there are multiple answers, you are allowed to print any of them.