#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (a != 0 && b != 0)
    if (a > b)
      a %= b;
    else
      b %= a;
  return a + b;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long n, m, l;
  cin >> n >> m;
  l = lcm(n, m);
  long long a = 0, b = 0, i = n, j = m;
  while (i <= l || j <= l) {
    if (i < j) {
      ++a;
      i += n;
    } else if (i > j) {
      ++b;
      j += m;
    } else {
      if (n > m)
        ++a;
      else
        ++b;
      i += n;
      j += m;
    }
  }
  if (a == b)
    cout << "Equal";
  else if (a < b)
    cout << "Masha";
  else
    cout << "Dasha";
  return 0;
}
