#include <bits/stdc++.h>
using namespace std;
const double EPS = -1e8;
const double Pi = acos(-1);
bool inline equ(double a, double b) { return fabs(a - b) < EPS; }
struct Pt {
  long long x, y;
  Pt operator-(Pt a) { return Pt{x - a.x, y - a.y}; }
  long long operator%(Pt a) { return x * a.y - y * a.x; }
  bool operator<(Pt a) const { return tie(x, y) < tie(a.x, a.y); }
  bool operator==(Pt a) const { return tie(x, y) == tie(a.x, a.y); }
  void input() { cin >> x >> y; }
};
const int MAXN = 100010;
int n, m;
Pt O;
Pt pmn[MAXN], pmx[MAXN];
set<Pt> shit;
vector<Pt> pts, cvx;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  O.input();
  for (int i = (1); i <= (n); i++) pmx[i].input();
  shit = set<Pt>(pmx + 1, pmx + 1 + n);
  for (int i = (1); i <= (m); i++) pmn[i].input();
  for (int i = (1); i <= (n); i++) pts.push_back(pmx[i]);
  for (int i = (1); i <= (m); i++) pts.push_back(pmn[i]);
  sort((pts).begin(), (pts).end(),
       [&](Pt a, Pt b) { return a.x == b.x ? a.y > b.y : a.x < b.x; });
  pts.resize(unique((pts).begin(), (pts).end()) - pts.begin());
  for (Pt p : pts) {
    while ((int)(cvx).size() && cvx.back().y < p.y) cvx.pop_back();
    while ((int)(cvx).size() >= 2 &&
           (p - cvx[(int)(cvx).size() - 2]) %
                   (cvx.back() - cvx[(int)(cvx).size() - 2]) <
               0ll)
      cvx.pop_back();
    cvx.push_back(p);
  }
  bool ans = 0;
  for (Pt p : cvx)
    if (shit.count(p)) ans = 1;
  cout << (ans ? "Max\n" : "Min\n");
}
