#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long getTime(int a, int b, long long L) {
  bool exc = false;
  if (a > b) {
    exc = true;
    swap(a, b);
  }
  long long ret = 0, bb = b;
  while (bb < L) {
    ret += bb - (bb / a) * a;
    bb += b;
  }
  ret += L - (L / a - 1) * a;
  if (exc) ret = L - ret;
  return ret;
}
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  long long L = (long long)a * b / gcd(a, b);
  long long Masha = getTime(a, b, L);
  long long Dasha = L - Masha;
  if (Dasha > Masha)
    printf("Dasha\n");
  else if (Dasha < Masha)
    printf("Masha\n");
  else
    printf("Equal");
  return 0;
}
