x,y,a,b=$<.read.scan(/\d+/).map &:to_i c=[x,y].max d=[a,b].max puts x==y ? d