#include <bits/stdc++.h>
using namespace std;
vector<long long> Dasha;
vector<long long> Masha;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long D, M;
  cin >> D >> M;
  if (D == M) {
    cout << "Equal" << endl;
    return 0;
  }
  for (long long i = 1; i * D <= (D * M) / gcd(max(M, D), min(M, D)); i++) {
    Dasha.push_back(i * D);
  }
  for (long long i = 1; i * M <= (D * M) / gcd(max(M, D), min(M, D)); i++) {
    Dasha.push_back(i * M);
  }
  sort(Dasha.begin(), Dasha.end());
  long long ansD = 0, ansM = 0;
  for (int i = 0; i < Dasha.size() - 1; i++) {
    if (Dasha[i] % D == 0) {
      ansD += Dasha[i + 1] - Dasha[i];
    } else {
      ansM += Dasha[i + 1] - Dasha[i];
    }
  }
  if (M < D) {
    ansD += Dasha[0];
  } else {
    ansM += Dasha[0];
  }
  if (ansM == ansD) {
    cout << "Equal" << endl;
    return 0;
  }
  if (ansM < ansD) {
    cout << "Dasha" << endl;
  } else {
    cout << "Masha" << endl;
  }
  return 0;
}
