Odd Numbers

Time limit1sMemory limit128 MB

Summary
Given seven natural numbers, print the sum of the odd ones and the smallest odd one, or -1 if none exist.
Level

Easy1 of 10

Topics
Array, Implementation
Solved
No attempts yet

Problem

Seven natural numbers are given. Select only the odd numbers, compute their sum, and find the smallest selected odd number.

Input

One natural number is given on each of the first through seventh lines. Each number is less than 100.

Output

If there is no odd number, print -1. Otherwise, print the sum of the odd numbers on the first line and the smallest odd number on the second line.

Examples2

  1. Example 1

    Input
    12
    77
    38
    41
    53
    92
    85
    
    Expected output
    256
    41
  2. Example 2

    Input
    2
    4
    20
    32
    6
    10
    8
    
    Expected output
    -1