PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000290. Khôi phục số sau khi bỏ chữ số cuối (Rare Easy Problem)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Khôi phục số sau khi bỏ chữ số cuối (Rare Easy Problem)

Rare Easy Problem

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

Consider a positive integer NN containing at least two decimal digits. Remove its last digit to obtain M=⌊N/10⌋M=\lfloor N/10\rfloor, then compute D=N−MD=N-M.

You are given only DD. Find every integer NN with at least two digits producing exactly this difference. Print these distinct integers in increasing order.

Input

One line containing an integer DD, the difference obtained by removing the last digit and subtracting.

Output

Print all valid integers NN in increasing order on one line, separated by single spaces.

Subtasks

  • Subtask 1 (20 points): 10≤D≤50010\le D\le 500.
  • Subtask 2 (30 points): 10≤D≤10910\le D\le 10^9.
  • Subtask 3 (50 points): 10≤D≤101810\le D\le 10^{18}.

Examples

Input

18

Output

19 20

Explanation

For N=19N=19, removing the last digit gives M=1M=1, and 19−1=1819-1=18. For N=20N=20, it gives M=2M=2, and 20−2=1820-2=18. These are the only two valid values, so the output is 19 20.