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