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