#include <bits/stdc++.h>
using namespace std;
vector<long long> sb;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long a, b, ea = 0, eb = 0;
  cin >> a >> b;
  long long lcm = a * b / gcd(a, b);
  sb.clear();
  for (long long v = a; v <= lcm; v += a) sb.push_back(v);
  for (long long v = b; v < lcm; v += b) sb.push_back(v);
  sort(sb.begin(), sb.end());
  long long nt = 0LL;
  for (int i = 0; i < sb.size(); i++) {
    if (sb[i] != lcm) {
      if (sb[i] % a == 0)
        ea += sb[i] - nt;
      else
        eb += sb[i] - nt;
    } else {
      if (a > b)
        ea += sb[i] - nt;
      else
        eb += sb[i] - nt;
    }
    nt = sb[i];
  }
  if (ea == eb)
    cout << "Equal" << endl;
  else if (ea > eb)
    cout << "Dasha" << endl;
  else
    cout << "Masha" << endl;
  return 0;
}
