while~0: a=map(int,raw_input().split());n=0;t="" for e in a:t+=" |"[n==sum(a)/2]+`e`;n+=e print t[1:]