#include <bits/stdc++.h>
using namespace std;
long long a, b, first, second;
int main() {
  cin >> a >> b;
  long long t = 0;
  do {
    long long end1 = t + (a - t % a);
    long long end2 = t + (b - t % b);
    if (end1 < end2) {
      first += end1 - t;
      t = end1;
    } else if (end1 > end2) {
      second += end2 - t;
      t = end2;
    } else {
      if (a > b)
        first += end1 - t;
      else
        second += end1 - t;
      t = end1;
    }
  } while (t % a || t % b);
  if (first > second)
    cout << "Dasha\n";
  else if (first < second)
    cout << "Masha\n";
  else
    cout << "Equal\n";
}
