#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y >= x) swap(x, y);
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int main() {
  long long a, b, f, k, masha, dasha;
  cin >> a >> b;
  f = gcd(a, b);
  k = a * (b / f);
  dasha = (k - 1) / a;
  masha = (k - 1) / b;
  if (dasha > masha)
    masha++;
  else if (masha > dasha)
    dasha++;
  else {
    dasha++;
    masha++;
  }
  if (masha > dasha)
    cout << "Masha" << endl;
  else if (masha < dasha)
    cout << "Dasha" << endl;
  else
    cout << "Equal" << endl;
  return 0;
}
