Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/chapga-va-onga-raqam-yozish

Write a digit on the left and on the right

Easy 1000 ms 64 MB 14%
Share

A three-digit positive integer $n$ and a digit $d$ are given. Find the number obtained by writing $d$ to the left of $n$ and the number obtained by writing $d$ to the right of $n$.

One digit is written to the left and to the right of a three-digit number; two new numbers are formed

Input

One line with two positive integers: $n$ and $d$.

Output

One line with two positive integers: the number with $d$ written on the left and the number with $d$ written on the right.

Note

$100 \le n \le 999$
$1 \le d \le 9$

Examples

Input #1
123 7
Output #1
7123 1237
Input #2
900 1
Output #2
1900 9001

Sign in to submit a solution

Signing up is free and takes a minute.