#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0 || b == 0) {
    return 0;
  }
  long long s;
  while (a != 0) {
    b = b % a;
    s = a;
    a = b;
    b = s;
  }
  return b;
}
int main() {
  long long a, b;
  cin >> a >> b;
  long long g = gcd(a, b);
  long long lcm = (a * b) / g;
  long long toa = 0;
  long long tob = 0;
  long long pos = 0;
  long long nexta = a;
  long long nextb = b;
  while (pos < lcm) {
    if (nexta == nextb) {
      if (a < b) {
        tob += (nextb - pos);
        pos = nextb;
        nextb += b;
      } else {
        toa += (nexta - pos);
        pos = nexta;
        nexta += a;
      }
    } else if (nexta < nextb) {
      toa += (nexta - pos);
      pos = nexta;
      nexta += a;
    } else {
      tob += (nextb - pos);
      pos = nextb;
      nextb += b;
    }
  }
  if (toa == tob) {
    cout << "Equal" << endl;
  } else if (toa > tob) {
    cout << "Dasha" << endl;
  } else {
    cout << "Masha" << endl;
  }
  return 0;
}
