#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000;
long long a, b, lcm;
vector<long long> Time;
long long get_gcd(long long a, long long b) {
  if (!b) return a;
  return get_gcd(b, a % b);
}
int main() {
  cin >> a >> b;
  lcm = a * b / get_gcd(a, b);
  for (long long i = 0; i <= lcm; i += a) {
    Time.push_back(i);
  }
  for (long long i = 0; i <= lcm; i += b) {
    Time.push_back(i);
  }
  sort(Time.begin(), Time.end());
  Time.erase(unique(Time.begin(), Time.end()), Time.end());
  Time.resize(Time.end() - Time.begin());
  long long r1 = 0, r2 = 0;
  for (long long i = 1; i < Time.size(); i++) {
    bool f1, f2;
    f1 = (Time[i] % a == 0);
    f2 = (Time[i] % b == 0);
    if (f1 && !f2) {
      r1 += Time[i] - Time[i - 1];
    } else if (!f1 && f2) {
      r2 += Time[i] - Time[i - 1];
    } else if (f1 && f2) {
      if (a > b) {
        r1 += Time[i] - Time[i - 1];
      } else {
        r2 += Time[i] - Time[i - 1];
      }
    }
  }
  if (r1 > r2) {
    printf("Dasha\n");
  } else if (r1 < r2) {
    printf("Masha\n");
  } else {
    printf("Equal\n");
  }
  return 0;
}
