#include <bits/stdc++.h>
using namespace std;
set<pair<long long, pair<long long, long long> > > s0, s;
long long K;
long long xx[200010], yy[200010];
char fg[200005];
inline char chk(long long ax, long long ay, long long bx, long long by,
                long long cx, long long cy) {
  return 1ll * (ax - bx) * (by - cy) < 1ll * (bx - cx) * (ay - by);
}
void func(long long x, long long y, char f) {
  while (K > 0 && yy[K - 1] < y) K--;
  while (K >= 2 && chk(xx[K - 1], yy[K - 1], xx[K - 2], yy[K - 2], x, y)) K--;
  xx[K] = x;
  yy[K] = y;
  fg[K] = f;
  K++;
}
signed main(void) {
  long long N, M, x, y, i;
  cin >> N >> M >> x >> y;
  for ((i) = 0; (i) < (long long)(N); (i)++) {
    scanf("%lld%lld", &x, &y);
    s0.insert(make_pair(x, make_pair(y, 1)));
    s.insert(make_pair(x, make_pair(-y, 1)));
  }
  for ((i) = 0; (i) < (long long)(M); (i)++) {
    scanf("%lld%lld", &x, &y);
    s.insert(make_pair(x, make_pair(-y, 0)));
  }
  for (__typeof((s).begin()) itr = (s).begin(); itr != (s).end(); itr++) {
    x = (*itr).first;
    y = (*itr).second.first;
    func(x, -y, (*itr).second.second);
  }
  for (long long i = 0; i < K; i++)
    if (fg[i]) return puts("Max"), 0;
  return puts("Min"), 0;
}
