#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long a, b;
  cin >> a >> b;
  long long lcm = a * b / gcd(a, b);
  if (a == b) {
    cout << "Equal" << endl;
    return 0;
  }
  bool x = true;
  if (a < b) {
    long long temp = b;
    b = a;
    a = temp;
    x = false;
  }
  long long k = a;
  long long ans = 0;
  while (k != lcm) {
    ans += k % b;
    k += a;
  }
  ans += b;
  if (2 * ans == lcm)
    cout << "Equal" << endl;
  else if (2 * ans > lcm)
    cout << (x ? "Dasha" : "Masha") << endl;
  else
    cout << (!x ? "Dasha" : "Masha") << endl;
}
