/* ☆゚゚゚゚・*・゚゚゚゚・*・゚゚゚゚・*・゚゚゚゚☆ ┏‥┓   ∧♔∧  ┃提├┓ (。・ω・。) 50 万♡♡ ┗┬出├┳━〇━〇━━━━━━┓  ┗┬*┃おめでとぅござぃます┃   ┗‥┻‥━‥━‥━━━━━┛ ☆。。。。・*・。。。。・*・。。。。・*・。。。。☆ */ import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.TreeSet; public class Main { public static void main(String[] args) { new Main().run(); } long dfs(long cur,long[] A,int s) { long ret=0; boolean flag=false; for (int next=0;next>next)%2==0 && A[next]<=cur) { ret=Math.max(ret, dfs(cur%A[next],A,s|(1< Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }