Under construction

Still being built. Things may change

Can't Do It at Home

Time limit1sMemory limit1024 MB

Summary
Given home and study room work times, travel time T, and sleep time S, find where to finish the assignment and the minimum time to submit it.
Level

Medium5 of 10

Topics
Math, Simulation
Solved
No attempts yet

Problem

Byeolsil has an assignment to finish. There are many other things to do, so Byeolsil wants to submit the assignment as quickly as possible and move on.

Doing homework at home is very inefficient. Home has a cozy bed that makes you want to lie down and sleep, and a TV that makes news you never watched before look interesting once you have work to do. A study room has none of these distractions, so Byeolsil can focus fully and finish faster.

Sometimes working at home is still better. You can lie down on the bed right behind you or turn on YouTube the moment the assignment is done. It sounds strange, but it does happen.

No matter what the task is, fatigue builds up at some point. Working while fighting off drowsiness lowers efficiency, so Byeolsil must sleep for a fixed amount of time after working 8 hours. This applies to homework too. A study room does not allow sleep, so Byeolsil must go home to sleep and then come back to the study room to continue.

We know Byeolsil's routine, so let us decide where Byeolsil should do the assignment for the sake of Byeolsil's work-life balance (Work-Life Balance).

Byeolsil starts at home. Once an assignment is started, it cannot be continued at another place. Once it is finished, it can be submitted over the internet from anywhere.

Input

The first line contains two integers NN and MM, the time needed to do the assignment at home and the time needed to do it at the study room. (1≤N,M≤1012)(1 \le N, M \le 10^{12})

The second line contains two integers TT, the time it takes to travel between home and the study room, and SS, Byeolsil's sleep time. (1≤T,S≤10 000)(1 \le T, S \le 10\,000)

Output

If doing the assignment at home lets Byeolsil submit faster, print Zip on the first line. If doing it at the study room is faster, print Dok on the first line.

On the second line, print the minimum time needed to submit the assignment.

The minimum time is never the same for home and the study room.

Examples2

  1. Example 1

    Input
    35 24
    4 8
    
    Expected output
    Dok
    60
    
  2. Example 2

    Input
    24 20
    4 8
    
    Expected output
    Zip
    40