#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int s1, s2;
  int t1, t2;
  scanf("%d:%d", &s1, &s2);
  scanf("%d:%d", &t1, &t2);
  int x = (s1 * 60 + s2 - t1 * 60 - t2) % 1440;
  printf("%.2d:%.2d\n", (x / 60 >= 0) ? x / 60 : 24 + x / 60,
         (x % 60 >= 0) ? x % 60 : 60 + x % 60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
imul   $0x3c,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
imul   $0x3c,-0x10(%rbp),%ecx
sub    %ecx,%eax
sub    -0x14(%rbp),%eax
mov    $0x5a0,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jl     1199 <main+0x79>
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
jmp    11aa <main+0x8a>
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
add    $0x18,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jl     11d7 <main+0xb7>
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
jmp    11ea <main+0xca>
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x3c,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
sub    0x4(%rsp),%eax
mov    0x8(%rsp),%ecx
imul   $0x3c,%eax,%eax
sub    (%rsp),%ecx
add    %eax,%ecx
movslq %ecx,%rax
imul   $0xffffffffb60b60b7,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xa,%ecx
add    %edx,%ecx
imul   $0x5a0,%ecx,%ecx
sub    %ecx,%eax
movswl %ax,%ecx
imul   $0xffff8889,%ecx,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
sar    $0x5,%edx
add    %ecx,%edx
movswl %dx,%ecx
lea    0x18(%rcx),%esi
cmp    $0xffffffc5,%eax
cmovge %ecx,%esi
imul   $0x3c,%edx,%ecx
sub    %ecx,%eax
cwtl
lea    0x3c(%rax),%edx
test   %ax,%ax
cmovns %eax,%edx
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d:%d\00"
@.str.1 = [11 x i8] c"%.2d:%.2d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5)
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 60
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 60
%15 = sub nsw i32 %12, %14
%16 = load i32, i32* %5
%17 = sub nsw i32 %15, %16
%18 = srem i32 %17, 1440
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = sdiv i32 %19, 60
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %0
%23 = load i32, i32* %6
%24 = sdiv i32 %23, 60
br label %29
25: ; preds = %0
%26 = load i32, i32* %6
%27 = sdiv i32 %26, 60
%28 = add nsw i32 24, %27
br label %29
29: ; preds = %25, %22
%30 = phi i32 [ %24, %22 ], [ %28, %25 ]
%31 = load i32, i32* %6
%32 = srem i32 %31, 60
%33 = icmp sge i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %29
%35 = load i32, i32* %6
%36 = srem i32 %35, 60
br label %41
37: ; preds = %29
%38 = load i32, i32* %6
%39 = srem i32 %38, 60
%40 = add nsw i32 60, %39
br label %41
41: ; preds = %37, %34
%42 = phi i32 [ %36, %34 ], [ %40, %37 ]
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %42)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d:%d\00"
@.str.1 = [11 x i8] c"%.2d:%.2d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sub i32 %11, %13
%16 = mul i32 %15, 60
%17 = sub i32 %12, %14
%18 = add i32 %17, %16
%19 = srem i32 %18, 1440
%20 = trunc i32 %19 to i16
%21 = sdiv i16 %20, 60
%22 = sext i16 %21 to i32
%23 = icmp sgt i32 %19, -60
%24 = add nsw i32 %22, 24
%25 = select i1 %23, i32 %22, i32 %24
%26 = srem i16 %20, 60
%27 = sext i16 %26 to i32
%28 = icmp sgt i16 %26, -1
%29 = add nsw i32 %27, 60
%30 = select i1 %28, i32 %27, i32 %29
%31 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %30)
ret i32 0
}