s = raw_input() a = "" b = "" for i in s: tmp1 = int(i) / 2 tmp2 = int(i) % 2 tmp3 = int(tmp1) + int(tmp2) a += str(tmp1) b += str(tmp3) print int(a), int(b)