#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ret = 0, c, f = 1;
  for (c = getchar(); !(isdigit(c) || c == '-'); c = getchar())
    ;
  if (c == '-') f = -1, c = getchar();
  for (; isdigit(c); c = getchar()) ret = ret * 10 + c - '0';
  if (f < 0) ret = -ret;
  return ret;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b;
  cin >> a >> b;
  long long period;
  period = lcm(a, b);
  set<long long> g;
  for (long long q = a; q <= period; q += a) g.insert(q);
  for (long long q = b; q <= period; q += b) g.insert(q);
  long long ans_a, ans_b, last;
  ans_a = ans_b = last = 0;
  for (auto it = g.begin(); it != g.end(); ++it) {
    long long k = (*it);
    bool da = (k % a == 0);
    bool db = (k % b == 0);
    if (da && db) {
      if (a > b) {
        ans_a += k - last;
      } else {
        ans_b += k - last;
      }
    } else if (da) {
      ans_a += k - last;
    } else {
      ans_b += k - last;
    }
    last = k;
  }
  if (ans_a == ans_b) {
    cout << "Equal";
  } else if (ans_a > ans_b) {
    cout << "Dasha";
  } else {
    cout << "Masha";
  }
}
