N = int(input()) ans = "" c9, c6, c3 = 10**9, 10**6, 10**3 if N >= c9: ans = str(N // c9) + "," + "{:03d}".format((N % c9) // c6) + "," + "{:03d}".format((N%c6) // c3) + "," + "{:03d}".format(N % c3) elif N >= c6: ans = str((N % c9) // c6) + "," + "{:03d}".format((N%c6) // c3) + "," + "{:03d}".format(N % c3) elif N >= c3: ans = str((N%c6) // c3) + "," + "{:03d}".format(N % c3) else: ans = str(N) print(ans)