{"raw_statement":[{"iden":"statement","content":"Kiana thinks two integers are friends if and only if one of them divides the other one. For example, 12 and 4 are friends, also 6 and 6 are friends too, but 120 and 36 are not.\n\nA group of non-zero integers is called friendly, if each pair of its integers form a friend pair.\n\nYou are given a group of non-zero integers. See if they're friendly."},{"iden":"input","content":"The first line contains _n_ (1 ≤ _n_ ≤ 1000), where _n_ — the number of integers in the group.\n\nThe next line contains the elements, sorted in the non-decreasing order. The numbers are comma separated, they have at most 7 digits in their decimal notation and do not have any leading zeros."},{"iden":"output","content":"If the group is friendly write \"_FRIENDS_\", else write \"_NOT FRIENDS_\"."},{"iden":"examples","content":"Input\n\n4\n1,3,6,12\n\nOutput\n\nFRIENDS\n\nInput\n\n3\n1,2,9\n\nOutput\n\nNOT FRIENDS"}],"translated_statement":[{"iden":"statement","content":"Kiana 认为两个整数是朋友，当且仅当其中一个能整除另一个。例如，12 和 4 是朋友，6 和 6 也是朋友，但 120 和 36 不是。\n\n一组非零整数被称为友好的，当且仅当其中每一对整数都构成朋友对。\n\n给定一组非零整数，请判断它们是否友好。\n\n第一行包含 #cf_span[n]（#cf_span[1 ≤ n ≤ 1000]），其中 #cf_span[n] 表示该组中整数的个数。\n\n第二行包含按非递减顺序排列的元素，数字以逗号分隔，每个数的十进制表示最多有 7 位数字，且没有前导零。\n\n如果该组是友好的，请输出 \"_FRIENDS_\"，否则输出 \"_NOT FRIENDS_\"。\n\n"},{"iden":"input","content":"第一行包含 #cf_span[n]（#cf_span[1 ≤ n ≤ 1000]），其中 #cf_span[n] 表示该组中整数的个数。第二行包含按非递减顺序排列的元素，数字以逗号分隔，每个数的十进制表示最多有 7 位数字，且没有前导零。"},{"iden":"output","content":"如果该组是友好的，请输出 \"_FRIENDS_\"，否则输出 \"_NOT FRIENDS_\"。"},{"iden":"examples","content":"输入\n4\n1,3,6,12\n输出\nFRIENDS\n\n输入\n3\n1,2,9\n输出\nNOT FRIENDS"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ with $ 1 \\leq n \\leq 1000 $ be the number of integers.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of non-zero integers, sorted in non-decreasing order, with $ |a_i| \\leq 10^7 $ for all $ i $.\n\n**Constraints**  \nFor all $ i \\in \\{1, \\dots, n\\} $, $ a_i \\neq 0 $ and $ a_i \\in \\mathbb{Z} $.\n\n**Objective**  \nDetermine whether for all pairs $ (i, j) $ with $ 1 \\leq i < j \\leq n $, either $ a_i \\mid a_j $ or $ a_j \\mid a_i $.  \nIf yes, output \"_FRIENDS_\"; otherwise, output \"_NOT FRIENDS_\".","simple_statement":null,"has_page_source":false}