#include <bits/stdc++.h>
using namespace std;
long long _gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return _gcd(b, a % b);
}
long long _lcm(long long a, long long b) {
  long long num = _gcd(a, b);
  return (a * b) / num;
}
int main() {
  long long a, b;
  cin >> a >> b;
  if (a == b) {
    cout << "Equal";
    return 0;
  }
  long long num = _lcm(a, b);
  long long dasha = 0, masha = 0;
  long long min_v = min(a, b);
  long long max_ = max(a, b);
  if (min_v == a)
    dasha++;
  else
    masha++;
  long long end_v = min_v;
  for (long long i = min_v; i < num;) {
    if (a * (dasha + 1) - i < b * (masha + 1) - i) {
      dasha++;
      i = a * dasha;
    } else if (a * (dasha + 1) - i > b * (masha + 1) - i) {
      masha++;
      i = b * masha;
    } else {
      if (dasha < masha) {
        dasha++;
        i = a * dasha;
      } else {
        masha++;
        i = b * masha;
      }
    }
  }
  if (masha > dasha)
    cout << "Masha";
  else if (masha < dasha)
    cout << "Dasha";
  else
    cout << "Equal";
  return 0;
}
