#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  long long now, x, y, ca, cb;
  scanf("%d%d", &a, &b);
  now = ca = cb = 0;
  x = a;
  y = b;
  while (x != y) {
    if (x < y || (x == y && a > b)) {
      ca += x - now;
      now = x;
      x += a;
    } else {
      cb += y - now;
      now = y;
      y += b;
    }
  }
  if (a > b)
    ca += x - now;
  else
    cb += y - now;
  if (ca == cb)
    puts("Equal");
  else
    puts(ca > cb ? "Dasha" : "Masha");
  return 0;
}
