This page is still under construction.

Parts of this page are still being built. What you see may change.

Find the Students Who Didn't Submit

Interview

Time limit1sMemory limit128 MB

Summary
Given 28 distinct attendance numbers from 1 to 30, print the two missing numbers in increasing order.
Level

Easy1 of 10

Topics
Array, Implementation
Solved
No attempts yet

Problem

Professor M at University X teaches a programming course. There are 30 students in the class, and the roster assigns each student an attendance number from 1 to 30.

Of the 30 students, 28 submitted the professor's special assignment. Write a program that finds the attendance numbers of the 2 students who did not submit.

Input

Across 28 lines, the attendance numbers of the 28 students who submitted the assignment are given, one per line. Each attendance number nn satisfies 1≤n≤301 \le n \le 30, and no number is repeated.

Output

Print two lines. On the first line, print the smaller of the two attendance numbers of the students who did not submit; on the second line, print the larger one.

Examples2

  1. Example 1

    Input
    3
    1
    4
    5
    7
    9
    6
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    
    Expected output
    2
    8
    
  2. Example 2

    Input
    9
    30
    6
    12
    10
    20
    21
    11
    7
    5
    28
    4
    18
    29
    17
    19
    27
    13
    16
    26
    14
    23
    22
    15
    3
    1
    24
    25
    
    Expected output
    2
    8