#include <bits/stdc++.h>
using namespace std;
const long long int max_i = 998244353;
const int dx[] = {1, 0, -1, 0, -1, 1, 1, -1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
const char dir[] = {'D', 'R', 'U', 'L'};
long long int GCD(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
void solve() {
  long long int t = 1;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    long long int lcm = (a * b) / GCD(a, b);
    long long int a1 = lcm / a, b1 = lcm / b;
    if (a1 > b1)
      a1--;
    else
      b1--;
    if (a1 > b1)
      cout << "Dasha";
    else if (b1 > a1)
      cout << "Masha";
    else
      cout << "Equal";
  }
}
int main() {
  solve();
  return 0;
}
