#include <bits/stdc++.h>
using namespace std;
long long BMM(long long a, long long b) {
  long long c = a;
  a = max(a, b);
  b = min(c, b);
  while (b != 0) {
    c = a;
    a = b;
    b = c % b;
  }
  return a;
}
int main() {
  long long a, b;
  cin >> a >> b;
  long long x = BMM(a, b);
  x = a * b / x;
  int u = (x - 1) / a;
  int v = (x - 1) / b;
  if (u > v + 1)
    cout << "Dasha\n";
  else if (v > u + 1)
    cout << "Masha\n";
  else
    cout << "Equal\n";
}
