#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios_base::sync_with_stdio(0);
  long long a, b;
  cin >> a >> b;
  long long lcm = a * b / gcd(a, b), mx = max(a, b), mn = min(a, b);
  long long sd = 0, sm = 0;
  for (long long i = 0; i < lcm / mx; ++i) {
    long long add = mx * (i + 1) % mn;
    if (a > b)
      sd += (add ? add : mn);
    else
      sm += (add ? add : mn);
  }
  if (a > b)
    sm = lcm - sd;
  else
    sd = lcm - sm;
  if (sd > sm) cout << "Dasha";
  if (sd < sm) cout << "Masha";
  if (sd == sm) cout << "Equal";
  cout << endl;
  return 0;
};
