<PREV Problem:
NEXT>
Solved by 92 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Roots of polynom

Time limit = 5

Your program should determine whether all roots of 4-degree polynom have modulus less than 1.

Input Input consists of one line with 5 coefficients delimited with space. Coefficients are real numbers less than 1 000 000 in absolute value.

Input line

 1 2 3 4 5
corresponds to
 x4 + 2x3 + 3x2 + 4x + 5

Note that coefficients may be equal to zero, and actual degree of the polynom may be less than 4. It's known that root's set is not empty.

In input tests there are no polynoms having maximum modulus of root equal to exactly 1.

Output One line with 'YES' (if absolute values of all roots less than 1) or 'NO' (otherwise).

Input#1
1 1 1 1 0.5
Output#1
YES
Input#2
5 4 3 2 10
Output#2
NO

Author:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 170ms

SW soft NIX
ID = 54.162.181.75