#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	cout<<n*24<<endl;
	cout<<n*60*24;
	return 0;
} 
/**************************************************************
	Problem: 1600
	User: fuhoubin
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/