#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
long long a, b;
int main() {
  int i, j, k, t, nc = 0;
  while (cin >> a >> b) {
    long long cnt = 0;
    int w = 0;
    if (a > b) {
      swap(a, b);
      w = 1;
    }
    for (i = 1; i <= b; i++) {
      long long t0 = a * i / b;
      t0 *= b;
      t0 = max(t0, a * (i - 1));
      cnt += a * i - t0;
    }
    string ans = "Equal";
    if (cnt * 2 != a * b) {
      if (cnt * 2 > a * b) w ^= 1;
      if (w == 1)
        ans = "Dasha";
      else
        ans = "Masha";
    }
    cout << ans << endl;
  }
  return 0;
}
