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