#include <bits/stdc++.h>
const long long INF = (long long)1e7 + 1;
const long long mod = (long long)998244353;
const long long hell = (long long)1000000007;
using namespace std;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y % 2) res = (x * res);
    x = (x * x);
    y = y / 2;
  }
  return res;
}
long long int modinv(long long int x) { return power(x, hell - 2); }
void solve();
void fastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  fastIO();
  int test;
  test = 1;
  while (test--) solve();
}
long long int pw(long long int k, long long int x);
long long int gcd(long long int x, long long int y);
void solve() {
  long long int d, m;
  cin >> d >> m;
  priority_queue<long long int, vector<long long int>, greater<long long int>>
      pq;
  pq.push(d);
  pq.push(m);
  long long int cntm = 0, cntd = 0;
  while (true) {
    long long int p = pq.top();
    pq.pop();
    if (p % d == 0 and p % m == 0) {
      if (m > d)
        cntm++;
      else
        cntd++;
      break;
    }
    if (p % d == 0) {
      cntd++;
      pq.push(p + d);
    } else {
      cntm++;
      pq.push(p + m);
    }
  }
  if (cntm > cntd) {
    cout << "Masha";
  } else if (cntd > cntm)
    cout << "Dasha";
  else
    cout << "Equal";
}
long long int gcd(long long int a, long long int b) {
  while (b != 0) {
    long long int t = b;
    b = a % t;
    a = t;
  }
  return a;
}
long long int pw(long long int k, long long int x) {
  if (x == 0) return 1;
  if (x & 1)
    return ((pw(k, x - 1)) * k);
  else
    return ((pw(k, x / 2)) * (pw(k, x / 2)));
}
