406704: GYM102503 A Vincent Adultman

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Vincent Adultmantime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

Vincent Adultman and his three friends – Anthony Matureperson, Rene Grownindividual, and Pierre Grandhomme – want to ride a rollercoaster. However, only people who are at least $$$h$$$ inches can ride the rollercoaster.

Vincent's height is $$$v$$$ inches, Anthony's height is $$$a$$$ inches, Rene's height is $$$r$$$ inches, and Pierre's height is $$$p$$$ inches.

Vincent and his friends know that at most three of them can stand on top of each other to "form" a taller "person". The height of this "person" is the height of the three children combined.

Can they choose a set of three people among themselves so that the "person" those three people form can ride the rollercoaster?

Input

The input consists of five lines.

The first line contains a single integer $$$v$$$.

The second line contains a single integer $$$a$$$.

The third line contains a single integer $$$r$$$.

The fourth line contains a single integer $$$p$$$.

The fifth line contains a single integer $$$h$$$.

Output

Output a single line containing a single string which is WAW if they can choose a set of three people among themselves so that the "person" formed by those three people can ride the rollercoaster, or AWW if they cannot.

Scoring

$$$12 \le v, a, r, p, h \le 150$$$

Subtask 1 (50 points):

$$$v = a = r = p$$$

Subtask 2 (50 points):

No additional constraints.

ExamplesInput
20
20
20
20
61
Output
AWW
Input
24
55
42
69
143
Output
WAW
Note

In the first sample test case, Vincent's height is $$$20$$$ inches, Anthony's height is $$$20$$$ inches, Rene's height is $$$20$$$ inches, and Pierre's height is $$$20$$$ inches. Also, only people who are at least $$$61$$$ inches can ride the rollercoaster.

There is no way to choose a set of three people among themselves so that the "person" those three people form can ride the rollercoaster, so the answer is AWW.

In the second sample test case, Vincent's height is $$$24$$$ inches, Anthony's height is $$$55$$$ inches, Rene's height is $$$42$$$ inches, and Pierre's height is $$$69$$$ inches. Also, only people who are at least $$$143$$$ inches can ride the rollercoaster.

Vincent, Pierre, and Anthony can form a "person" with height $$$24 + 69 + 55 = 148$$$ inches and this "person" can ride the rollercoaster, so the answer is WAW.

加入题单

算法标签: