#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r, tmp;
  if (a < b) return gcd(b, a);
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  int a, b, g, i;
  bool flag = false;
  unsigned long long resa = 0, T;
  cin >> a >> b;
  g = gcd(a, b);
  a /= g;
  b /= g;
  if ((a > b && a - b == 1) || (a < b && b - a == 1)) {
    cout << "Equal\n";
    return 0;
  }
  if (a < b) {
    cout << "Dasha\n";
  } else {
    cout << "Masha\n";
  }
  return 0;
}
