DIVREL  Divisibility Relation
English  Vietnamese 
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
 Line 1: n (1 ≤ n ≤ 200).
 Line 2: n positive integers a_{1}, a_{2}, ..., a_{n} (1 ≤ a_{i} ≤ 10^{9}).
Output
 Line 1: k, the maximum number of integers that can be selected.
 Line 2: k selected integers.
Example
Input 8 1 2 3 5 6 8 7 9 Output 5 5 6 8 7 9 Input 4 2 3 2 3 Output 2 2 3
hide comments
candide:
20140505 02:58:22
Very interesting question but hard to solve if you don't know the trick. 

Eternia:
20100525 04:34:51
can we print any answer in arbitrary order?


Navin Parakkal:
20090731 22:44:32
can print put any maximum subset ? 
Added by:  Duc 
Date:  20081022 
Time limit:  0.194s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  Vietnamese IOI Selection Test 2007 