n = gets.chomp.split.map(&:to_i) p ((n.max)**2 - (n.min)**2)**0.5 if n[0] != n[1] p ((n.max)**2 + (n.min)**2)**0.5 if n[0] == n[1]