EPIC1302 - Greatest Common Divisor

no tags 

For a given set of numbers, return the greatest common divisor.  If the numbers are co-prime, return 1.  Note that you may be given more than 2 numbers.  All inputs can be stored in an unsigned 32-bit integer.

Input

A list of numbers.

Output

The greatest common divisor.

Example

Input:
10
25
50

Output:
5


Added by:BYU Admin
Date:2013-03-20
Time limit:2s-15s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64