407191: GYM102697 162 Parallel Lines

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

Description

162. Parallel Linestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
This problem is worth 10 points.

Your younger sibling needs help with their algebra homework, and it involves a full worksheet of detecting parallel lines in equations! Too inarticulate to explain how to find these parallel lines, you decide to create a piece of code that will solve the problems for them.

Input

You will be given two lines of linear equations in $$$y=mx+b$$$ form. See the example input for the exact formatting. $$$m$$$ will always be written before the $$$x$$$ term, even if $$$m$$$ is equal to 1.

Output

If the two linear equations are parallel, output "PARALLEL", otherwise output "NOT PARALLEL".

ExamplesInput
y=17x+12
y=2x+21
Output
NOT PARALLEL
Input
y=-8x+3
y=-8x+1
Output
PARALLEL

加入题单

算法标签: