import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int j=0; static long mo=0; static long yo(long a,long dum,long sum1) { if(j==0) { mo=a; j++; } long i; for(i=2;i<=a;i++) { if(a%i==0) { dum+=i; yo(a/i,dum,sum1); } if(dum>sum1&&a%i==0) sum1=dum; } j=0; return sum1; } static long longestSequence(long[] a) { long sum=0; long dum=1; long dum1=1; long l=0; for(int i=0;i