#include <bits/stdc++.h>
int gcd(int a, int b) {
  int tmp;
  do {
    tmp = b % a;
    b = a;
    a = tmp;
  } while (a > 0);
  return b;
}
int main() {
  int a, b, tmp, na = 1, nb = 0;
  scanf("%d%d", &a, &b);
  char s1[10] = "Dasha\n";
  char s2[10] = "Masha\n";
  if (a > b) {
    tmp = a;
    a = b;
    b = tmp;
    s1[0] = 'M';
    s2[0] = 'D';
  }
  na += a / gcd(a, b);
  nb += b / gcd(a, b);
  if (na == nb) printf("Equal\n");
  if (na < nb) printf("%s", s1);
  if (na > nb) printf("%s", s2);
  return 0;
}
