#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  x = max(n, m);
  y = min(n, m);
  n = n / gcd(x, y);
  m = m / gcd(x, y);
  if (abs(n - m) == 1)
    printf("Equal");
  else if (n > m)
    printf("Masha");
  else
    printf("Dasha");
  return 0;
}
