#include <bits/stdc++.h>
using namespace std;
template <class T, class IT>
inline void PRINT(IT i1, IT i2) {
  cout << '[';
  copy(i1, i2, ostream_iterator<T>(cout, ", "));
  cout << "]\n";
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long dasha, masha;
  cin >> dasha >> masha;
  long long a = min(dasha, masha);
  long long b = max(dasha, masha);
  long long period_length = lcm(a, b);
  long long next_a = a;
  long long next_b = b;
  long long mint = 0;
  long long lastt = 0;
  while (lastt != period_length) {
    long long event_time = min(next_a, next_b);
    if (event_time == next_a && event_time != next_b) {
      mint += (next_a - lastt);
      next_a += a;
    } else if (event_time != next_a && event_time == next_b) {
      next_b += b;
    } else {
      break;
    }
    lastt = event_time;
  }
  if (mint == period_length - mint) {
    cout << "Equal" << endl;
  } else if (mint < period_length - mint) {
    if (dasha < masha)
      cout << "Masha\n";
    else
      cout << "Dasha\n";
  } else {
    if (dasha < masha)
      cout << "Dasha\n";
    else
      cout << "Masha\n";
  }
  return 0;
}
