#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  unsigned long long A = a;
  int mx = a;
  unsigned long long B = b;
  int mn = b;
  if (b > a) {
    A = b;
    mx = b;
    B = a;
    mn = a;
  }
  unsigned long long M = 0, N = 0;
  while (B != A) {
    while (B < A) {
      B = B + mn;
      M = M + mn;
    }
    N = N + B - A;
    M = M + A - B;
    if (B > A) {
      A = A + mx;
    }
  }
  N = N + mn;
  if (a > b) {
    if (M > N)
      cout << "Masha";
    else if (N > M)
      cout << "Dasha";
    else
      cout << "Equal";
  } else {
    if (M > N)
      cout << "Dasha";
    else if (N > M)
      cout << "Masha";
    else
      cout << "Equal";
  }
  return 0;
}
