import sequtils,strutils proc ctoi(c : char):int8= return c.int8 - '0'.int8 var sosuu : seq[int] j : int t : int8 N = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) aset : set[int8] flag : array[5_000_001,bool] flag2 : bool flag3 : bool Mlen = 0 li : int sosuu = @[0] for i in 2..5_000_000: if flag[i] == false: j = i * 2 sosuu.add(i) while j < 5_000_000: flag[j] = true j += i sosuu.add(5_000_001) for a in A: aset.incl(a.int8) flag2 = false var bset = aset for i,n in sosuu[1.. 0: echo Mlen else: echo -1