#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int t = a;
  while (b != 0) {
    t = a;
    a = b;
    b = t % a;
  }
  return a;
}
int main() {
  int a, b;
  cin >> a >> b;
  long long c = 1LL * a / gcd(a, b) * b;
  int x = (c - 1) / a + (a > b), y = (c - 1) / b + (b > a);
  if (x == y)
    cout << "Equal" << endl;
  else if (x > y)
    cout << "Dasha" << endl;
  else
    cout << "Masha" << endl;
  return 0;
}
