#include <bits/stdc++.h>
using namespace std;
inline int MAX(int a, int b) { return a > b ? a : b; }
inline int MIN(int a, int b) { return a < b ? a : b; }
const int INF = (-1u) >> 1;
const double EPS = 1e-8;
const double PI = acos(-1.0);
const int MAXN = 1010;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int a, b, t, ta, tb;
  scanf("%d%d", &a, &b);
  t = gcd(a, b);
  ta = b / t, tb = a / t;
  if (ta - tb == 1 || tb - ta == 1)
    printf("Equal\n");
  else if (ta < tb)
    printf("Masha\n");
  else
    printf("Dasha\n");
  return 0;
}
