#include <bits/stdc++.h>
using namespace std;
long long gcd(long long n, long long m) { return m ? gcd(m, n % m) : n; }
int main() {
  long long a, b, a1, b1;
  cin >> a >> b;
  long long c = a * b;
  long long d = gcd(a, b);
  c = c / d;
  a1 = c / a;
  b1 = c / b;
  if (a < b)
    b1++;
  else
    a1++;
  if (a1 == b1)
    cout << "Equal";
  else if (a1 > b1)
    cout << "Dasha";
  else
    cout << "Masha";
}
