import sequtils,strutils var N = stdin.readline fugou : int A,B : string b : int A = "" B = "" for n in N: if n == '-': A &= '-' B &= '-' elif n != '7': A &= n B &= '0' else: A &= '6' B &= '1' b = B.parseInt echo A," " ,b