#include <bits/stdc++.h>
using namespace std;
const int MAXN = 101010;
int N, M;
int x, y;
pair<long long, long long> a[MAXN];
pair<long long, long long> c[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M;
  cin >> x >> y;
  for (int i = 0; i < N; i++) cin >> a[i].first >> a[i].second;
  for (int i = 0; i < M; i++) cin >> c[i].first >> c[i].second;
  sort(a, a + N);
  sort(c, c + M);
  long long mxh = 0;
  for (int i = 0; i < M; i++) mxh = max(mxh, c[i].second);
  vector<pair<long long, long long> > tb;
  tb.push_back(make_pair(0, mxh));
  for (int i = 0; i < M; i++) {
    while (tb.size() >= 2) {
      pair<long long, long long> p1 = tb[tb.size() - 2], p2 = tb[tb.size() - 1];
      pair<long long, long long> d1 =
          make_pair(p2.first - p1.first, p2.second - p1.second);
      pair<long long, long long> d2 =
          make_pair(c[i].first - p1.first, c[i].second - p1.second);
      long long cs = d1.first * d2.second - d1.second * d2.first;
      if (cs >= 0)
        tb.pop_back();
      else
        break;
    }
    tb.push_back(c[i]);
  }
  bool ok = true;
  int idx = 0;
  for (int i = 0; i < N; i++) {
    long long xx = a[i].first, yy = a[i].second;
    while (idx < (int)tb.size() - 1 && tb[idx + 1].first <= xx) idx++;
    if (idx == (int)tb.size() - 1) ok = false;
    pair<long long, long long> d1 = make_pair(
        tb[idx + 1].first - tb[idx].first, tb[idx + 1].second - tb[idx].second);
    pair<long long, long long> d2 =
        make_pair(xx - tb[idx].first, yy - tb[idx].second);
    long long cs = d1.first * d2.second - d1.second * d2.first;
    if (cs >= 0) ok = false;
  }
  cout << (ok ? "Min" : "Max") << endl;
  return 0;
}
