#include <bits/stdc++.h>
int a, b;
int gcd(int m, int n) {
  while (m && n) m > n ? m = m % n : n = n % m;
  return m = m > n ? m : n;
}
int main(void) {
  long long m, x, y, k1, k2;
  while (scanf("%d%d", &a, &b) == 2) {
    m = (long long)gcd(a, b);
    m = (long long)a * (long long)b / m;
    x = m / a;
    y = m / b;
    if (a < b) {
      k1 = x - 1;
      k2 = y;
    } else if (a == b) {
      k1 = x;
      k2 = y;
    } else {
      k1 = x;
      k2 = y - 1;
    }
    if (k1 < k2) {
      puts("Masha");
      continue;
    } else if (k1 > k2) {
      puts("Dasha");
      continue;
    } else
      puts("Equal");
  }
  return 0;
}
