#include #include #include #include #include #include using namespace std; int gcd(int u,int v) { if(u10*180) difms=10*360-difms; if(difhm>120*180) difhm=120*360-difhm; if(difhs>120*180) difhs=120*360-difhs; if(difhm%120==0) printf("%d ",difhm/120); else printf("%d/%d ",difhm/gcd(difhm,120),120/gcd(difhm,120)); if(difhs%120==0) printf("%d ",difhs/120); else printf("%d/%d ",difhs/gcd(difhs,120),120/gcd(difhs,120)); if(difms%10==0) printf("%d \n",difms/10); else printf("%d/%d \n",difms/gcd(difms,10),10/gcd(difms,10)); } return 0; }