import java.util.Scanner;
class ab
{
public static class time
{
int h,m,s;
time()
{
h=0;m=0;s=0;
}
time(int x)
{
h=x;m=0;s=0;
}
time(int x,int y)
{
h=x;m=y;s=0;
}
void show()
{
System.out.println(h+":"+m+":"+s);
}
};
public static void main(String []args)
{
Scanner t=new Scanner(System.in);
int t1=t.nextInt();
int t2=t.nextInt();
time now = new time(t1);
now.show();
time now1 = new time(t1,t2);
now1.show();
}
}
class ab
{
public static class time
{
int h,m,s;
time()
{
h=0;m=0;s=0;
}
time(int x)
{
h=x;m=0;s=0;
}
time(int x,int y)
{
h=x;m=y;s=0;
}
void show()
{
System.out.println(h+":"+m+":"+s);
}
};
public static void main(String []args)
{
Scanner t=new Scanner(System.in);
int t1=t.nextInt();
int t2=t.nextInt();
time now = new time(t1);
now.show();
time now1 = new time(t1,t2);
now1.show();
}
}