#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
const int MOD = 1e9 + 7;
const int N = 1e6 + 5;
int main() {
  ll a, b;
  cin >> a >> b;
  ll masha = 0, dasha = 0, dashaT = a, mashaT = b;
  while (true) {
    if (dashaT < mashaT) {
      dasha++;
      dashaT += a;
    } else if (dashaT > mashaT) {
      masha++;
      mashaT += b;
    } else {
      if (a > b)
        dasha++;
      else if (b > a)
        masha++;
      break;
    }
  }
  if (masha > dasha)
    puts("Masha");
  else if (dasha > masha)
    puts("Dasha");
  else
    puts("Equal");
  return 0;
}
