#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const double PI = acos(-1.0);
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
pair<long long, int> all[2000111];
long long cntA, cntB;
int cnt;
int main() {
  long long a, b;
  cin >> a >> b;
  long long x = a * b / gcd(a, b);
  for (int i = (1), _b = (x / a - 1); i <= _b; i++)
    all[cnt++] = make_pair(a * i, 0);
  for (int i = (1), _b = (x / b - 1); i <= _b; i++)
    all[cnt++] = make_pair(b * i, 1);
  sort(all, all + cnt);
  long long last = 0;
  for (int i = 0, _a = (cnt); i < _a; i++) {
    if (all[i].second == 0)
      cntA += all[i].first - last;
    else
      cntB += all[i].first - last;
    last = all[i].first;
  }
  if (a > b)
    cntA += x - last;
  else
    cntB += x - last;
  if (cntA > cntB)
    puts("Dasha");
  else if (cntA < cntB)
    puts("Masha");
  else
    puts("Equal");
  return 0;
}
