while 1: a=map(int,raw_input().split());s='';t=0 for x in a:s+=' |'[t==sum(a)/2]+`x`;t+=x print s[1:]