N = input() ans = '' for i,c in enumerate(N[::-1]): ans = c + ans if len(ans)%4==3 and i!=len(N)-1: ans = ',' + ans print(ans)