Under construction

Still being built. Things may change

Coast Guard

Time limit2sMemory limit512 MB

Summary
Decide whether a coast guard boat can intercept a thief heading straight out to sea 12 miles away, given their speeds and starting distance apart.
Level

Medium4 of 10

Topics
Geometry, Math, Binary search, Implementation
Solved
No attempts yet

Problem

A thief snatched the bag of a woman walking on a beach in Nlogônia and fled toward the sea. His plan is plain. He means to take a boat and get away.

The thief is already aboard. He heads perpendicular to the shoreline toward the limit of international waters, which lies 12 nautical miles out, where the local authorities cannot touch him. His boat covers that distance at a constant speed of VFV_F knots.

The coast guard means to intercept him, and its boat holds a constant speed of VGV_G knots. Both boats leave the shore at the same instant, with DD nautical miles between their starting points. Can the coast guard reach the thief before he passes the limit of international waters?

The shore of Nlogônia is perfectly straight and the sea is calm, so both boats sail in straight lines. The coast guard picks its interception point in advance and runs straight to it. Meeting the thief exactly on the limit counts as reaching him.

Input

The input has several test cases and ends at end of file (EOF). Each test case is one line with three integers DD (1≤D≤1001 \le D \le 100), VFV_F (1≤VF≤1001 \le V_F \le 100) and VGV_G (1≤VG≤1001 \le V_G \le 100), which are the initial distance between the thief and the coast guard, the speed of the thief's boat, and the speed of the coast guard's boat.

Output

For each test case print one line. Print S if the coast guard can reach the thief before he passes the limit of international waters, or N if it cannot.

Examples7

  1. Example 1

    Input
    5 1 12
    12 10 7
    12 9 10
    10 5 5
    9 12 15
    
    Expected output
    S
    N
    N
    N
    S
    
  2. Example 2

    Input
    1 1 1
    
    Expected output
    N
    
  3. Example 3

    Input
    5 12 13
    5 12 12
    16 3 5
    16 3 4
    
    Expected output
    S
    N
    S
    N
    
  4. Example 4

    Input
    100 1 100
    100 100 100
    100 100 1
    1 100 100
    
    Expected output
    S
    N
    N
    N
    
  5. Example 5

    Input
    100 1 8
    100 1 9
    
    Expected output
    N
    S
    
  6. Example 6

    Input
    1 100 100
    1 99 100
    1 1 2
    1 2 1
    1 50 51
    
    Expected output
    N
    S
    S
    N
    S
    
  7. Example 7

    Input
    12 1 2
    12 2 3
    12 3 4
    12 4 5
    12 5 6
    12 6 7
    12 7 8
    
    Expected output
    S
    S
    N
    N
    N
    N
    N