#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  long long a, b, d = 0, m = 0;
  cin >> a >> b;
  set<long long> st;
  for (long long i = 1; i <= b; i++) st.insert(i * a);
  for (long long i = 1; i <= a; i++) st.insert(i * b);
  long long pre = 0;
  for (set<long long>::iterator it = st.begin(); it != st.end(); it++) {
    if (*it % a == 0 && *it % b == 0) {
      if (d > m)
        m += *it - pre;
      else
        d += *it - pre;
    } else if (*it % a == 0) {
      d += *it - pre;
    } else {
      m += *it - pre;
    }
    pre = *it;
  }
  if (d > m)
    cout << "Dasha" << endl;
  else if (d < m)
    cout << "Masha" << endl;
  else
    cout << "Equal" << endl;
  return 0;
}
