SP3196 DIVREL - Divisibility Relation
Description
[English](/problems/DIVREL/en/) [Vietnamese](/problems/DIVREL/vn/)Given n positive integers. Your task is to select a maximum number of integers so that there are no two numbers a, b in which a is divisible by b.
Input Format
- Line 1: n (1 ≤ n ≤ 200).
- Line 2: n positive integers a $ _{1} $ , a $ _{2} $ , ..., a $ _{n} $ (1 ≤ a $ _{i} $ ≤ 10 $ ^{9} $ ).
Output Format
- Line 1: k, the maximum number of integers that can be selected.
- Line 2: k selected integers.