#B3932. Which Li Bai Drank the Most?

    ID: 11589 Type: Default 1000ms 256MiB

Which Li Bai Drank the Most?

Which Li Bai Drank the Most?

There are two types of wine buckets: a small bucket containing ( x ) liters of wine, and a big bucket containing ( y ) liters of wine.

Three Li Bais are given as follows:

  • Li Bai #1 drank \( a \) small buckets and \( b \) big buckets of wine.
  • Li Bai #2 drank \( c \) big buckets of wine.
  • Li Bai #3 drank \( d \) big buckets of wine and an extra \( e \) liters of wine.
Determine which Li Bai drank the most wine. The amounts consumed are calculated as follows:
  • Li Bai #1: \( a\times x + b\times y \)
  • Li Bai #2: \( c\times y \)
  • Li Bai #3: \( d\times y + e \)
Output the number (1, 2, or 3) corresponding to the Li Bai who drank the most.

inputFormat

The input consists of a single line containing seven space-separated integers: ( x, y, a, b, c, d, e ).

outputFormat

Output a single integer (1, 2, or 3) indicating which Li Bai drank the most wine.

sample

1 2 1 1 2 0 1
2