#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  long long a, b;
  cin >> a >> b;
  long long pend = lcm(a, b);
  long long vala = a, valb = b;
  long long pre = 0;
  long long ansa = 0, ansb = 0;
  while (vala <= pend && valb <= pend) {
    if (vala < valb) {
      ansa += vala - pre;
      pre = vala;
      vala += a;
    } else if (vala > valb) {
      ansb += valb - pre;
      pre = valb;
      valb += b;
    } else {
      if (a > b)
        ansa += vala - pre;
      else
        ansb += valb - pre;
      break;
    }
  }
  if (ansa > ansb)
    cout << "Dasha" << endl;
  else if (ansa < ansb)
    cout << "Masha" << endl;
  else
    cout << "Equal" << endl;
  return 0;
}
