#include <bits/stdc++.h>
using namespace std;
int gcd(long long x, long long y, int &a, int &b) {
  if (x < y) return gcd(y, x, b, a);
  if (y == 0) {
    a = 1;
    b = 0;
    return x;
  }
  int atmp, btmp;
  int g = gcd(y, x % y, atmp, btmp);
  a = btmp;
  b = atmp - (x / y) * btmp;
  return g;
}
int main() {
  ios::sync_with_stdio(false);
  int a, b;
  long long x, y;
  cin >> x >> y;
  int g = gcd(x, y, a, b);
  long long l = (x * y) / g;
  if (l / min(x, y) - 1 == l / max(x, y)) {
    cout << "Equal" << endl;
  } else {
    cout << (x < y ? "Dasha" : "Masha") << endl;
  }
}
