#include<stdio.h>
main()
{
    int x,b,m;
    scanf("%d",&x);
    b=x+28;
    m=b-2;
    printf("%d %d",b,m);
}