#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long int gcd(long long int a, long long int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
signed main() {
  long long int a, b;
  cin >> a >> b;
  long long int g = gcd(a, b);
  a /= g;
  b /= g;
  if (abs(a - b) == 1)
    cout << "Equal\n";
  else if (a < b)
    cout << "Dasha\n";
  else
    cout << "Masha\n";
  return 0;
}
