Under construction

Still being built. Things may change

Kings

Time limit2sMemory limit1024 MB

Summary
Given three armies' battalion counts and sizes, the task is to print the name or names of the army with the most warriors.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Statement

Joffrey's army consists of nn battalions of aa warriors each. Robb's army consists of mm battalions of bb warriors each. Stannis's army consists of kk battalions of cc warriors each.

Help the Citadel analysts find out which army is the strongest. The strength of an army is the total number of warriors in it.

Input

The first and only line of the input contains six integers n,m,k,a,b,cn, m, k, a, b, c (1≤n,m,k,a,b,c≤1031 \le n, m, k, a, b, c \le 10^3). These are the number of battalions for Joffrey, Robb, and Stannis, followed by the number of warriors in each battalion of the respective army.

Output

If the king with the strongest army has xx warriors, print the names of all kings whose armies have xx warriors on a single line, separated by spaces, in lexicographic order.

Examples2

  1. Example 1

    Input
    2 4 3 6 3 4
    
    Expected output
    Joffrey Robb Stannis
    
  2. Example 2

    Input
    2 3 3 6 3 4
    
    Expected output
    Joffrey Stannis