#include <bits/stdc++.h>
int main() {
  int m, n, l, i, t;
  while (scanf("%d%d", &m, &n) != EOF) {
    if (m > n)
      l = n;
    else
      l = m;
    for (i = l; i >= 1; i--) {
      if (m % i == 0 && n % i == 0) {
        t = i;
        break;
      }
    }
    if (n / t - m / t == 1 || n / t - m / t == -1)
      printf("Equal\n");
    else if (n / t > m / t)
      printf("Dasha\n");
    else
      printf("Masha\n");
  }
}
