#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,x,y;
cout<<"Nhap n="; cin>>n;
x=n;
y=n+1;
if (x%2==0) cout<<x-2<<endl;
else cout<<x-1<<endl;
if (y%5==0) cout<<y;
else {
while (y%5!=0)
y++;
cout<<y;
}
return 0;
}