#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return (((a % b) == 0) ? b : gcd(b, a % b));
}
long long int lcm(long long int a, long long int b) {
  return ((a * b) / gcd(a, b));
}
long long int a, b, mmc;
long long int p1, p2, t, c1, c2;
int main() {
  scanf("%I64d %I64d", &a, &b);
  mmc = lcm(a, b);
  p1 = a;
  p2 = b;
  t = c1 = c2 = 0;
  while (t < mmc) {
    if (p1 < p2) {
      c1 += p1 - t;
      t = p1;
      p1 += a;
    } else if (p1 == p2) {
      if (a > b)
        c1 += p1 - t;
      else
        c2 += p2 - t;
      t = p1;
      p1 += a;
      p2 += b;
    } else {
      c2 += p2 - t;
      t = p2;
      p2 += b;
    }
  }
  if (c1 > c2)
    printf("Dasha\n");
  else if (c2 > c1)
    printf("Masha\n");
  else
    printf("Equal\n");
  return 0;
}
