import java.util.*; import java.io.*; public class Main { void solve (FastScanner in, PrintWriter out, Methods ms) { int n = in.nextInt(); long[] a = in.nextLongArray(n); long gcd = gcdAll(a); for (int i=0; i0?gcd(b,a%b):a;} public long lcm (long a, long b) {return a/gcd(a,b)*b;} } static class FastScanner { private InputStream in; private byte[] buffer = new byte[1024]; private int length = 0, p = 0; public FastScanner (InputStream stream) { in = stream; } public boolean hasNextByte () { if (p < length) return true; else { p = 0; try {length = in.read(buffer);} catch (Exception e) {e.printStackTrace();} if (length <= 0) return false; } return true; } public int readByte () { if (hasNextByte() == true) return buffer[p++]; return -1; } public boolean isPrintable (int n) {return 33<=n&&n<=126;} public void skip () { while (hasNextByte() && !isPrintable(buffer[p])) p++; } public boolean hasNext () {skip(); return hasNextByte();} public String next () { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int t = readByte(); while (isPrintable(t)) { sb.appendCodePoint(t); t = readByte(); } return sb.toString(); } public String[] nextArray (int n) { String[] ar = new String[n]; for (int i=0; i