Under construction

Still being built. Things may change

Blueberry Waffle

Time limit1sMemory limit1024 MB

Summary
Given a pan that turns 180 degrees every r seconds and stops after f seconds, decide if the blueberry side faces up once the pan levels out.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

You are using a waffle maker machine to make a delicious blueberry waffle. One side of your waffle is covered in blueberries, while the other side is plain. Initially, the cooking pan of the waffle maker lies horizontally, and the blueberries are on the top side of the waffle. Once started, the cooking pan will rotate at a constant speed for a fixed duration, then stop. The cooking time is set so that when the waffle maker stops, the cooking pan will not be in a vertical position.

If the cooking pan is not horizontal after this time, the waffle maker will return to a horizontal position via the smallest rotation possible. Therefore, the waffle maker will rotate less than 9090 degrees, either forward or backward, until the cooking pan is horizontal again.

The pan rotates at a rate of 180 degrees every rr seconds, and stops after ff seconds. You don't want to take out your waffle with its blueberry side down. Therefore you'd like to figure out whether the blueberry side of the waffle is up or down after the cooking pan returns to a horizontal position.

Input

The single line of input contains two integers rr and ff (1≤r,f≤1041 \leq r, f \leq 10^4). The pan rotates at a rate of 180180 degrees every rr seconds, and stops after ff seconds. It is guaranteed that after ff seconds the cooking pan is not at a vertical position.

Output

Output a single line with a single string, which is up if the blueberry side of the waffle is up, or down otherwise.

Examples3

  1. Example 1

    Input
    10 20
    
    Expected output
    up
    
  2. Example 2

    Input
    10 34
    
    Expected output
    down
    
  3. Example 3

    Input
    10 47
    
    Expected output
    down