#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU A = gets.chomp.split B = gets.chomp.split case A[1].to_i <=> B[1].to_i when 0 puts '-1' when 1 puts A[0] else puts B[0] end