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