#include<bits/stdc++.h> using namespace std; int h,m,t; double s,v; int main() { cin>>s>>v; t=ceil(s/v)+10; if(t<=480){ t=480-t; } else if(t>480 and t<=1440){ t=24*60+480-t; } h=t/60; m=t%60; cout<<"0"<<h<<":"<<m; return 0; }