time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Let's call a positive integer composite if it has at least one divisor other than 11 and itself. For example:
- the following numbers are composite: 10241024, 44, 66, 99;
- the following numbers are not composite: 1313, 11, 22, 33, 3737.
You are given a positive integer nn. Find two composite integers a,ba,b such that a−b=na−b=n.
It can be proven that solution always exists.
Input
The input contains one integer nn (1≤n≤1071≤n≤107): the given integer.
Output
Print two composite integers a,ba,b (2≤a,b≤109,a−b=n2≤a,b≤109,a−b=n).
It can be proven, that solution always exists.
If there are several possible solutions, you can print any.
Examples
input
Copy
1
output
Copy
9 8
input
Copy
512
output
Copy
4608 4096
Problem-solving Description: The problems of water, constructed directly 9n and 8n can be.
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include<iostream>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n, a, b;
scanf("%lld", &n);
printf("%lld %lld\n", 9 * n, 8 * n);
return 0;
}