#include <bits/stdc++.h>
using namespace std;
unsigned long gcd(unsigned long a, unsigned long b);
int main() {
  unsigned long da = 0, ma = 0;
  cin >> da >> ma;
  unsigned long gc = gcd(da, ma);
  da /= gc;
  ma /= gc;
  if (abs(int(da - ma)) <= 1)
    cout << "Equal" << endl;
  else if (da < ma)
    cout << "Dasha" << endl;
  else
    cout << "Masha" << endl;
  return 0;
}
unsigned long gcd(unsigned long a, unsigned long b) {
  if (b == 0)
    return a;
  else
    return (gcd(b, a % b));
}
