#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b;
  cin >> a;
  cin >> b;
  vector<long long int> a1;
  vector<long long int> b1;
  for (int i = 1; i <= b; i++) {
    a1.push_back(i * a);
  }
  for (int i = 1; i <= a; i++) {
    b1.push_back(i * b);
  }
  long long int actr = 0;
  long long int bctr = 0;
  auto ita = a1.begin();
  auto itb = b1.begin();
  while (ita != a1.end() && itb != b1.end()) {
    if ((*ita) < (*itb)) {
      actr++;
      ita++;
    } else if ((*ita) == (*itb)) {
      ita++;
      itb++;
      if (a < b) {
        bctr++;
      } else if (b < a) {
        actr++;
      }
    } else {
      bctr++;
      itb++;
    }
  }
  for (auto it = ita; it != a1.end(); it++) {
    actr++;
  }
  for (auto it = itb; it != b1.end(); it++) {
    bctr++;
  }
  if (actr < bctr) {
    cout << "Masha";
  } else if (actr > bctr) {
    cout << "Dasha";
  } else {
    cout << "Equal";
  }
  return 0;
}
