#include <bits/stdc++.h>
using namespace std;
bool P[1000007];
vector<pair<long long, char> > Train;
int main() {
  long long a, b;
  cin >> a >> b;
  for (int i = 2; i < 1000007; ++i) {
    P[i] = true;
  }
  for (int i = 2; i < 1000007; ++i) {
    if (P[i]) {
      int k = 1;
      while (k * i <= 1000004) {
        P[k * i] = false;
        k++;
      }
    }
  }
  long long nod = 1;
  long long a2 = a;
  long long b2 = b;
  for (int i = 2; i < 1000007; ++i) {
    while ((a2 % i == 0) && (b2 % i == 0)) {
      nod = nod * i;
      a2 = a2 / i;
      b2 = b2 / i;
    }
  }
  long long nok = a * b / nod;
  int j = 1;
  while (a * j < nok) {
    Train.push_back(make_pair(a * j, 'D'));
    j++;
  }
  j = 1;
  while (b * j < nok) {
    Train.push_back(make_pair(b * j, 'M'));
    j++;
  }
  sort(Train.begin(), Train.end());
  long long D = 0;
  long long M = 0;
  if (Train[0].second == 'D') {
    D = D + Train[0].first;
  } else {
    M = M + Train[0].first;
  }
  for (int i = 1; i < Train.size(); ++i) {
    if (Train[i].second == 'D') {
      D = D + Train[i].first - Train[i - 1].first;
    } else {
      M = M + Train[i].first - Train[i - 1].first;
    }
  }
  if (a < b) {
    M = M + nok - Train[Train.size() - 1].first;
  } else {
    D = D + nok - Train[Train.size() - 1].first;
  }
  if (D > M) {
    cout << "Dasha";
  }
  if (M > D) {
    cout << "Masha";
  }
  if (M == D) {
    cout << "Equal";
  }
  return 0;
}
