#include<iostream>
using namespace std;
int main(){
int x;
cin>>x;
cout<<x/3600<<" "<<x/60%60<<" "<<x%60<<" "<<x;
return 0;
}