#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
A convert(B x) {
  stringstream s;
  s << x;
  A r;
  s >> r;
  return r;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  bool sw = false;
  if (a < b) {
    sw = true;
    swap(a, b);
  }
  int k = b / gcd(a, b);
  long long s1 = 0, s2 = 0, t = 0;
  for (int i = (0), _b(k); i < _b; ++i) {
    if (!(t % b))
      s1 += b;
    else
      s1 += t % b;
    t += a;
  }
  s2 = ((long long)a * (long long)b) / (gcd(a, b)) - s1;
  if (sw) swap(s1, s2);
  if (s1 == s2)
    cout << "Equal" << endl;
  else if (s1 > s2)
    cout << "Dasha" << endl;
  else
    cout << "Masha" << endl;
  return 0;
}
