#include <bits/stdc++.h>
long long int gcd(long long int a, long long int b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(a % b, b);
}
int main() {
  int a, b;
  long long int mx, as = 0, bs = 0, tm = 0, ca, cb;
  scanf("%d %d", &a, &b);
  ca = a, cb = b;
  mx = (((long long int)a) * b) / gcd(a, b);
  while (tm < mx) {
    if (ca < cb) {
      as += ca - tm;
      tm = ca;
      ca += a;
    } else if (cb < ca) {
      bs += cb - tm;
      tm = cb;
      cb += b;
    } else {
      if (a > b) {
        as += ca - tm;
        tm = ca;
        ca += a;
      } else {
        bs += cb - tm;
        tm = cb;
        cb += b;
      }
    }
  }
  if (as > bs)
    printf("Dasha\n");
  else if (as < bs)
    printf("Masha\n");
  else
    printf("Equal\n");
  return 0;
}
