#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, mx2, meet = 0;
  cin >> a >> b;
  long long res = abs(a - b);
  long long mx = max(a, b);
  mx2 = mx;
  long long mn = min(a, b);
  long long ab = a * b;
  while (mx <= ab) {
    if ((mx % mn) == 0) meet++;
    mx += mx2;
  }
  res -= meet;
  if (res >= 1) {
    if (mn == a)
      cout << "Dasha";
    else
      cout << "Masha";
  } else {
    cout << "Equal";
  }
  return 0;
}
