#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long c;
  while (a) {
    c = b % a;
    b = a;
    a = c;
  }
  return b;
}
long long lcm(long long a, long long b) {
  long long c = a * b;
  c = c / gcd(a, b);
  return c;
}
int main() {
  long long f, s, b, lc, prec, m, d, a;
  cin >> a >> b;
  m = 0;
  d = 0;
  lc = lcm(a, b);
  f = s = 0;
  prec = 0;
  while (prec < lc) {
    if (a * (f + 1) < b * (s + 1)) {
      ++f;
      d += a * f - prec;
      prec = a * f;
    } else {
      if (a * (f + 1) > b * (s + 1)) {
        ++s;
        m += b * s - prec;
        prec = b * s;
      } else {
        if (d > m) {
          ++s;
          m += b * s - prec;
          prec = b * s;
        } else {
          ++f;
          d += a * f - prec;
          prec = a * f;
        }
      }
    }
  }
  if (d > m)
    cout << "Dasha\n";
  else if (d < m)
    cout << "Masha\n";
  else
    cout << "Equal\n";
  return 0;
}
