Problem:
﻿Score: 100 points

Problem Statement

In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.

One day, there was an exam where a one-year-old child must write a program that prints Hello World, and a two-year-old child must write a program that receives integers A, B and prints A+B.

Takahashi, who is taking this exam, suddenly forgets his age.

He decides to write a program that first receives his age N (1 or 2) as input, then prints Hello World if N=1, and additionally receives integers A, B and prints A+B if N=2.

Write this program for him.

Constraints

N is 1 or 2.

A is an integer between 1 and 9 (inclusive).

B is an integer between 1 and 9 (inclusive).

Input

Input is given from Standard Input in one of the following formats:

1

2
A
B

Output

If N=1, print Hello World; if N=2, print A+B.

Sample Input 1

1

Sample Output 1

Hello World

As N=1, Takahashi is one year old. Thus, we should print Hello World.

Sample Input 2

2
3
5

Sample Output 2

8

As N=2, Takahashi is two years old. Thus, we should print A+B, which is 8 since A=3 and B=5.

Solution in Ruby (2.3.3) (judge verdict: Runtime Error)

def distance p1, p2
  (p1[:x] - p2[:x]).abs + (p1[:y] - p2[:y]).abs
end
def calc_height p_target, p_known
  distance(p_target, p_known) + p_known[:h]
end

def diff p1, p2
  {:x => p2[:x] - p1[:x], :y => p2[:y] - p1[:y]}
end
def dot_product v1, v2
  v1[:x]*v2[:x] + v1[:y]*v2[:y]
end


N_range = 0..100
center_candidates = N_range.map{|x| N_range.map{|y| {:x => x, :y => y}}}.flatten(1)

N = STDIN.gets.chomp.to_i
xyh = N.times.map do 
  data = STDIN.gets.chomp.split(" ").map(&:to_i)
  {:x => data[0], :y => data[1], :h => data[2]}
end

xyh.each_with_index do |base_item, i|
  center_candidates.reject!{|item| item[:x] == base_item[:x] and item[:y] == base_item[:y]} if base_item[:h] == 0
  
  ((i + 1)..(xyh.size - 1)).each do |j|
    compare_item = xyh[j]
    center_candidates.reject!{|item| item[:x] == compare_item[:x] and item[:y] == compare_item[:y]} if compare_item[:h] == 0

    if base_item[:h] == 0 and compare_item[:h] == 0
      # do nothing...
    elsif compare_item[:h] == 0 or base_item[:h] == 0
      non_zero_item, zero_item = if compare_item[:h] == 0
        [base_item, compare_item]
      else
        [compare_item, base_item]
      end
    
      dist = distance(base_item, compare_item)
      v1 = diff(non_zero_item, zero_item)
      center_candidates.select!{|item| dot_product(v1, diff(non_zero_item, item)) <= 0 or 2 * distance(non_zero_item, item) < dist - non_zero_item[:h]}
    else
      diff_h = compare_item[:h] - base_item[:h]
      center_candidates.select!{|item| distance(item, base_item) - distance(item, compare_item) == diff_h}
    end
  end
end

center = center_candidates.first
center_height = calc_height(center, xyh.first)
puts "#{center[:x]} #{center[:y]} #{center_height}"