#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  long long cur = 0;
  long long curA = 0, curB = 0;
  long long D = 0, M = 0;
  do {
    if (curA <= cur) curA += a;
    if (curB <= cur) curB += b;
    if (curA < curB)
      D += (curA - cur), cur = curA;
    else if (curB < curA)
      M += (curB - cur), cur = curB;
    else {
      if (a < b)
        M += (curB - cur);
      else
        D += (curA - cur);
    }
  } while (curA != curB);
  if (D > M)
    cout << "Dasha";
  else if (M > D)
    cout << "Masha";
  else
    cout << "Equal";
  return 0;
}
