Time

13:15:04
23 May 2012
Version for print

Those that are divided into 6

   For N integers define the sum and quantity of positive numbers which share on 6 without the rest.


Specifications

   Input

   In the first line the quantity of numbers N (0 < N ≤ 100) is set, next line through a blank is set the numbers which value on the module do not exceed 10000.

   Output

   In a unique line deduce at first quantity of the specified numbers and through a blank their sum.

 


Problem information

Time Limit: 0.5 seconds
Memory Limit: 64 MB
Balls for the passed test: 5
Complexity: 15% 957/1122
Source: SFE-2010 Variant 8
Classes: Beginners

Example

Example input

3
12 15 18

Example output

2 30


← The first is not greater for 2,5 Problems Number of words →