#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long a, b, c, n, m;
  scanf("%lld%lld", &a, &b);
  c = gcd(a, b);
  long long res = a * b / c;
  res--;
  n = res / a;
  m = res / b;
  if (n > m)
    m++;
  else if (n < m)
    n++;
  else {
    printf("Equal\n");
    return 0;
  }
  if (n > m)
    puts("Dasha");
  else if (n == m)
    printf("Equal\n");
  else
    printf("Masha\n");
  return 0;
}
