#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int t;
  if (a < b) {
    t = a;
    a = b;
    b = t;
  }
  if (b == 0)
    return a;
  else
    return gcd(b, (a % b));
}
int main() {
  int a, b, g;
  cin >> a >> b;
  g = gcd(a, b);
  a = a / g;
  b = b / g;
  if (abs(a - b) <= 1)
    cout << "Equal";
  else if (a < b)
    cout << "Dasha";
  else
    cout << "Masha";
  return 0;
}
