#include <bits/stdc++.h>
using namespace std;
long long arr[2000000] = {0}, brr[2000000] = {0};
vector<long long> vec;
long long mod = 1000000007;
map<long long, long long> mp;
long long fac(long long n) {
  long long i, prod = 1;
  for (i = 1; i <= n; i++) prod = ((i % mod) * (prod % mod)) % mod;
  return prod;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  long long k1, k2, x, y, i, j, k, mx, mn, n, temp, fn,
      cnt = 0, d, l, r, flag = 0, sum1 = 0, a, b, q, len1 = 0;
  cin >> a >> b;
  if (a == b) {
    printf("Equal\n");
    return 0;
  }
  k1 = 0;
  k2 = 1;
  long long lcm = a * b / gcd(a, b);
  mx = max(a, b);
  mn = min(a, b);
  while (1) {
    sum1 += mx * k1 % mn;
    k1++;
    if (mx * k1 == lcm) break;
  }
  sum1 += mn;
  if (lcm - sum1 > sum1) {
    if (a > b)
      printf("Masha\n");
    else
      printf("Dasha\n");
  } else if (lcm - sum1 < sum1) {
    if (a > b)
      printf("Dasha\n");
    else
      printf("Masha\n");
  } else
    printf("Equal\n");
  return 0;
}
