Alarm Clock

No attempts yetTime limit2sMemory limit256 MB

Problem

Alice likes her digital alarm clock and sets it every evening. Last night she dreamed about the clock. The only thing she remembers is how many segments were lit. Alice wants to know what time the clock showed in her dream.

The clock displays four digits. The first two are the hour and the last two are the minute, and a single digit value gets a leading zero. For example, half past nine reads 09:30.

Each digit is drawn with seven segments. The number of lit segments per digit is:

Digit0123456789
Lit segments6255456376

The colon between the hour and the minute does not count toward the number of lit segments.

Input

The first line contains the number of lit segments nn that Alice saw in her dream. (0n300 \le n \le 30)

Output

Print a time whose four digits use exactly nn lit segments, as five characters in "hh:mm" format. The time must satisfy 0hh<240 \le hh < 24 and 0mm<600 \le mm < 60.

If several times satisfy the condition, print the earliest one, that is, the smallest "hh:mm" string in lexicographic order. If no time satisfies the condition, print Impossible.