#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  long long a, b;
  cin >> a >> b;
  bool sw = false;
  if (a > b) {
    sw = true;
    swap(a, b);
  }
  long long lcm = a * b / gcd(a, b);
  long long pos = 0;
  long long lb = 0, kb = b;
  while (kb <= lcm) {
    long long x = kb / a;
    if (kb % a == 0) x--;
    lb += kb - x * a;
    kb += b;
  }
  if (lb * 2 == lcm)
    puts("Equal");
  else if (lb * 2 < lcm)
    puts(!sw ? "Dasha" : "Masha");
  else
    puts(!sw ? "Masha" : "Dasha");
}
