a,b=gets.split.map{|i|i.to_i**2};p [a+b,a-b,b-a][a<=>b]