#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
using namespace std;
int main() {
  long long a, b;
  cin >> a >> b;
  long long lc = lcm(a, b);
  long long DashaFreq = (lc / a) - 1;
  long long MashaFreq = (lc / b) - 1;
  if (DashaFreq < MashaFreq) {
    if (DashaFreq + 1 == MashaFreq)
      cout << "Equal";
    else
      cout << "Masha";
  } else {
    if (DashaFreq == MashaFreq + 1)
      cout << "Equal";
    else
      cout << "Dasha";
  }
}
