#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b;
  cin >> a >> b;
  long long int A = a, B = b;
  long long int CA = 0, CB = 0;
  while (true) {
    if (A == B) {
      if (a > b)
        CA += A;
      else
        CB += B;
      break;
    } else if (A < B) {
      CA += A;
      B -= A;
      A = a;
    } else {
      CB += B;
      A -= B;
      B = b;
    }
  }
  if (CA == CB) cout << "Equal" << endl;
  if (CA > CB) cout << "Dasha" << endl;
  if (CA < CB) cout << "Masha" << endl;
}
