#include <bits/stdc++.h>
using namespace std;
vector<long long> Arr;
long long GCD(long long Number1, long long Number2) {
  if (Number2 == 0) return Number1;
  return GCD(Number2, Number1 % Number2);
}
long long LCM(long long Number1, long long Number2) {
  return (Number1 * Number2) / GCD(Number1, Number2);
}
void FirstMulti(long long Number1, long long Number2) {
  long long LastCommon = LCM(Number1, Number2);
  int counter = 1;
  while (Number1 * counter <= LastCommon) {
    Arr.push_back(Number1 * counter);
    counter++;
  }
}
void SecondMulti(long long Number1, long long Number2) {
  long long LastCommom = LCM(Number1, Number2);
  int counter = 1;
  while (Number2 * counter < LastCommom) {
    if (Number2 % Number1 != 0) {
      Arr.push_back(Number2 * counter);
    }
    counter++;
  }
}
int main() {
  int Number1, Number2;
  cin >> Number1 >> Number2;
  Arr.push_back(0);
  FirstMulti(Number1, Number2);
  SecondMulti(Number1, Number2);
  sort(Arr.begin(), Arr.end());
  int MashaCount = 0;
  int DashaCount = 0;
  for (int i = 1; i < Arr.size(); i++) {
    if (Arr[i] % Number1 == 0 && Arr[i] % Number2 != 0) {
      DashaCount++;
    } else if (Arr[i] % Number2 == 0 && Arr[i] % Number1 != 0) {
      MashaCount++;
    } else {
      if (MashaCount >= DashaCount) {
        DashaCount++;
      } else
        MashaCount++;
    }
  }
  if (MashaCount > DashaCount)
    cout << "Masha" << endl;
  else if (MashaCount < DashaCount)
    cout << "Dasha" << endl;
  else
    cout << "Equal" << endl;
}
