#include <bits/stdc++.h>
using namespace std;
long long a, b, LCM;
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  cin >> a >> b;
  if (a == b) {
    cout << "Equal";
    return 0;
  }
  LCM = a / gcd(a, b) * b;
  long long t1 = LCM / a, t2 = LCM / b, cons = t1 + 1;
  for (int i = 0; i < cons; ++i)
    if (i) {
      if ((a * i) % b == 0) {
        if (a < b)
          --t1;
        else
          --t2;
      }
    }
  if (t1 > t2) cout << "Dasha";
  if (t1 < t2) cout << "Masha";
  if (t1 == t2) cout << "Equal";
  return 0;
}
