#include <bits/stdc++.h>
using namespace std;
const int size = 31;
const long long int mod = 2000000011;
const long long int inf = 1e18;
long long int fast_exp(long long int x, long long int p) {
  long long int res = 1LL;
  x %= mod;
  while (p) {
    if (p & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    p >>= 1;
  }
  return res;
}
long long int ncr(long long int n, long long int r) {
  if (r == 1) return n;
  return (n * ncr(n - 1, r - 1)) / r;
}
long long int gcd(long long int a, long long int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
int main() {
  int a, b;
  cin >> a >> b;
  long long int lcm = 1LL * a * b;
  lcm /= gcd(a, b);
  vector<pair<long long int, int> > v;
  for (int i = 1; i <= (lcm / a); i++) v.push_back({1LL * i * a, 0});
  for (int i = 1; i <= (lcm / b); i++) v.push_back({1LL * i * b, 1});
  sort(v.begin(), v.end(),
       [a, b](pair<long long int, int> p1, pair<long long int, int> p2) {
         if (p1.first != p2.first) return p1.first < p2.first;
         if (a < b)
           return p1.second > p2.second;
         else
           return p1.second < p2.second;
       });
  long long int dasha = 0LL, masha = 0LL;
  for (int i = 0; i < v.size(); i++) {
    long long int prev;
    if (i == 0)
      prev = 0;
    else
      prev = v[i - 1].first;
    if (v[i].second == 0)
      dasha += v[i].first - prev;
    else
      masha += v[i].first - prev;
  }
  if (dasha > masha)
    cout << "Dasha\n";
  else if (masha > dasha)
    cout << "Masha\n";
  else
    cout << "Equal\n";
  return 0;
}
