Vasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one is unaware of the other one's existence.
When Vasya has some free time, he goes to one of his girlfriends. He descends into the subway at some time, waits the first train to come and rides on it to the end of the branch to the corresponding girl. However, the trains run with different frequencies: a train goes to Dasha's direction every _a_ minutes, but a train goes to Masha's direction every _b_ minutes. If two trains approach at the same time, Vasya goes toward the direction with the lower frequency of going trains, that is, to the girl, to whose directions the trains go less frequently (see the note to the third sample).
We know that the trains begin to go simultaneously before Vasya appears. That is the train schedule is such that there exists a moment of time when the two trains arrive simultaneously.
Help Vasya count to which girlfriend he will go more often.
## Input
The first line contains two integers _a_ and _b_ (_a_ ≠ _b_, 1 ≤ _a_, _b_ ≤ 106).
## Output
Print "_Dasha_" if Vasya will go to Dasha more frequently, "_Masha_" if he will go to Masha more frequently, or "_Equal_" if he will go to both girlfriends with the same frequency.
[samples]
## Note
Let's take a look at the third sample. Let the trains start to go at the zero moment of time. It is clear that the moments of the trains' arrival will be periodic with period 6. That's why it is enough to show that if Vasya descends to the subway at a moment of time inside the interval (0, 6\], he will go to both girls equally often.
If he descends to the subway at a moment of time from 0 to 2, he leaves for Dasha on the train that arrives by the second minute.
If he descends to the subway at a moment of time from 2 to 3, he leaves for Masha on the train that arrives by the third minute.
If he descends to the subway at a moment of time from 3 to 4, he leaves for Dasha on the train that arrives by the fourth minute.
If he descends to the subway at a moment of time from 4 to 6, he waits for both trains to arrive by the sixth minute and goes to Masha as trains go less often in Masha's direction.
In sum Masha and Dasha get equal time — three minutes for each one, thus, Vasya will go to both girlfriends equally often.
Vasya 这位程序员住在编程地铁支线的中间。他有两个女朋友:Dasha 和 Masha,她们分别住在支线的两端,彼此都不知道对方的存在。
当 Vasya 有空闲时间时,他会去其中一位女朋友那里。他会在某个时刻进入地铁,等待第一班列车到来,然后乘坐它直达支线尽头,去往对应的女朋友。然而,列车的发车频率不同:开往 Dasha 方向的列车每 #cf_span[a] 分钟一班,而开往 Masha 方向的列车每 #cf_span[b] 分钟一班。如果两班列车同时到达,Vasya 会选择发车频率较低的方向,即前往列车发车频率更低的女朋友那里(见第三个样例的说明)。
我们知道,列车在 Vasya 出现之前就已经开始运行。也就是说,列车时刻表满足存在一个时刻,使得两班列车同时到达。
请帮助 Vasya 统计他更常去哪位女朋友那里。
第一行包含两个整数 #cf_span[a] 和 #cf_span[b](#cf_span[a ≠ b, 1 ≤ a, b ≤ 106])。
如果 Vasya 更常去 Dasha 那里,请输出 "_Dasha_";如果更常去 Masha 那里,请输出 "_Masha_";如果去两位女朋友的频率相同,请输出 "_Equal_"。
我们来看第三个样例。假设列车在时刻 0 开始运行。显然,列车到达时刻将以周期 6 重复。因此,只需证明:若 Vasya 在区间 #cf_span[(0, 6]] 内的任意时刻进入地铁,他去往两位女朋友的频率是相同的。
若他在 0 到 2 分钟之间进入地铁,他会乘坐在第 2 分钟到达的列车去 Dasha。
若他在 2 到 3 分钟之间进入地铁,他会乘坐在第 3 分钟到达的列车去 Masha。
若他在 3 到 4 分钟之间进入地铁,他会乘坐在第 4 分钟到达的列车去 Dasha。
若他在 4 到 6 分钟之间进入地铁,他会等待两班列车在第 6 分钟同时到达,并由于 Masha 方向的列车发车频率更低,选择去 Masha。
总计,Masha 和 Dasha 各获得三分钟的时间,因此 Vasya 去两位女朋友的频率相同。
## Input
第一行包含两个整数 #cf_span[a] 和 #cf_span[b](#cf_span[a ≠ b, 1 ≤ a, b ≤ 106])。
## Output
如果 Vasya 更常去 Dasha 那里,请输出 "_Dasha_";如果更常去 Masha 那里,请输出 "_Masha_";如果去两位女朋友的频率相同,请输出 "_Equal_"。
[samples]
## Note
我们来看第三个样例。假设列车在时刻 0 开始运行。显然,列车到达时刻将以周期 6 重复。因此,只需证明:若 Vasya 在区间 #cf_span[(0, 6]] 内的任意时刻进入地铁,他去往两位女朋友的频率是相同的。若他在 0 到 2 分钟之间进入地铁,他会乘坐在第 2 分钟到达的列车去 Dasha。若他在 2 到 3 分钟之间进入地铁,他会乘坐在第 3 分钟到达的列车去 Masha。若他在 3 到 4 分钟之间进入地铁,他会乘坐在第 4 分钟到达的列车去 Dasha。若他在 4 到 6 分钟之间进入地铁,他会等待两班列车在第 6 分钟同时到达,并由于 Masha 方向的列车发车频率更低,选择去 Masha。总计,Masha 和 Dasha 各获得三分钟的时间,因此 Vasya 去两位女朋友的频率相同。
Let $ a, b \in \mathbb{Z}^+ $, $ a \ne b $, denote the train intervals (in minutes) to Dasha and Masha, respectively.
Let $ T = \mathrm{lcm}(a, b) $ be the period of the combined train schedule.
Define the set of train arrival times within one period $ [0, T) $:
- Dasha's trains arrive at times $ \{ ka \mid k \in \mathbb{Z},\ 0 \leq ka < T \} $,
- Masha's trains arrive at times $ \{ lb \mid l \in \mathbb{Z},\ 0 \leq lb < T \} $.
Let $ S = \{ t_1, t_2, \dots, t_n \} $ be the sorted multiset of all distinct train arrival times in $ [0, T) $, with multiplicity (i.e., if a train arrives at time $ t $ for both, it is still one event).
For each interval $ (t_i, t_{i+1}) $, $ i = 0, \dots, n-1 $, where $ t_0 = 0 $ and $ t_n = T $, define the next train arrival time as $ t_{i+1} $. For any Vasya arrival time in $ (t_i, t_{i+1}) $, he takes the train arriving at $ t_{i+1} $.
If $ t_{i+1} $ is a Dasha train, assign the interval length $ t_{i+1} - t_i $ to Dasha; if Masha, assign to Masha.
If $ t_{i+1} $ is a simultaneous arrival (i.e., $ t_{i+1} = ka = lb $), then assign the interval to the direction with the **larger** interval (i.e., **lower** frequency), meaning:
- If $ a > b $, assign to Masha (since $ b $ is smaller frequency),
- If $ b > a $, assign to Dasha.
Let $ A $ be the total length of intervals assigned to Dasha, and $ B $ to Masha, over $ [0, T) $.
Then:
- If $ A > B $, output "Dasha",
- If $ B > A $, output "Masha",
- If $ A = B $, output "Equal".