#include <bits/stdc++.h>
using namespace std;
long long int a, b, c, t, u;
int nod(long long int p, long long int q) {
  while (p > 0 && q > 0) {
    if (p > q)
      p %= q;
    else
      q %= p;
  }
  return max(p, q);
}
int main() {
  cin >> a >> b;
  c = nod(a, b);
  a /= c;
  b /= c;
  t = a * b;
  if (a > b) {
    u = b * (b + 1) / 2;
    if (2 * u > t)
      cout << "Dasha";
    else if (2 * u == t)
      cout << "Equal";
    else if (2 * u < t)
      cout << "Masha";
  } else {
    u = a * (a + 1) / 2;
    if (2 * u > t)
      cout << "Masha";
    else if (2 * u == t)
      cout << "Equal";
    else if (2 * u < t)
      cout << "Dasha";
  }
  return 0;
}
