CF359D Pair of Numbers

题目描述

Simon 有一个长度为 $ N $ 的正整数数列 $ a_1 , a_2 , \cdots , a_n $ ,现在他想找到这个数列中最长的一个区间,满足区间中有一个数可以整除区间中任意数。

输入格式

输出格式

说明/提示

In the first sample the pair of numbers is right, as numbers $ 6,9,3 $ are divisible by $ 3 $ . In the second sample all numbers are divisible by number $ 1 $ . In the third sample all numbers are prime, so conditions $ 1 $ and $ 2 $ are true only for pairs of numbers $ (1,1) $ , $ (2,2) $ , $ (3,3) $ , $ (4,4) $ , $ (5,5) $ .