#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, bool> > d;
long long gcd(long long x, long long y) {
  while (x != 0) {
    y %= x;
    swap(x, y);
  }
  return y;
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  long long a, b, g, s1 = 0, s0 = 0;
  cin >> a >> b;
  g = lcm(a, b);
  d.push_back(make_pair(0, 0));
  for (long long i = a, j = b; i < g || j < g;)
    if (i < j) {
      d.push_back(make_pair(i, 0));
      i += a;
    } else {
      d.push_back(make_pair(j, 1));
      j += b;
    }
  if (a < b)
    d.push_back(make_pair(g, 1));
  else
    d.push_back(make_pair(g, 0));
  sort(d.begin(), d.end());
  for (long long i = 1; i < d.size(); ++i)
    if (!d[i].second)
      s0 += (d[i].first - d[i - 1].first);
    else
      s1 += (d[i].first - d[i - 1].first);
  if (s0 == s1) cout << "Equal";
  if (s0 < s1) cout << "Masha";
  if (s0 > s1) cout << "Dasha";
  return 0;
}
