#include <bits/stdc++.h>
using namespace std;
long long ans[3];
struct Node {
  long long num, m;
} no[2000006];
bool cmp(Node a, Node b) { return a.num < b.num; }
long long gcd(long long a, long long b) {
  if (a % b)
    return gcd(b, a % b);
  else
    return b;
}
int main() {
  long long a, b, t, i;
  int v = 1;
  cin >> a >> b;
  t = gcd(a, b);
  t = a * b / t;
  if (a > b) {
    for (i = 1; i < t / b; i++) {
      no[v].m = 2;
      no[v++].num = b * i;
    }
    for (i = 1; i <= t / a; i++) {
      no[v].m = 1;
      no[v++].num = a * i;
    }
  } else {
    for (i = 1; i < t / a; i++) {
      no[v].m = 1;
      no[v++].num = a * i;
    }
    for (i = 1; i <= t / b; i++) {
      no[v].m = 2;
      no[v++].num = b * i;
    }
  }
  sort(no, no + v, cmp);
  for (int i = 1; i < v; i++) ans[no[i].m] += no[i].num - no[i - 1].num;
  if (ans[1] == ans[2])
    cout << "Equal" << endl;
  else {
    if (ans[1] > ans[2])
      cout << "Dasha" << endl;
    else
      cout << "Masha" << endl;
  }
  return 0;
}
