#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  bool operator<(const PT &rhs) const {
    return make_pair(y, x) < make_pair(rhs.y, rhs.x);
  }
  bool operator==(const PT &rhs) const {
    return make_pair(y, x) == make_pair(rhs.y, rhs.x);
  }
};
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
double area2(PT a, PT b, PT c) {
  return cross(a, b) + cross(b, c) + cross(c, a);
}
void ConvexHull(vector<PT> &pts) {
  sort(pts.begin(), pts.end());
  pts.erase(unique(pts.begin(), pts.end()), pts.end());
  vector<PT> up, dn;
  for (int i = 0; i < pts.size(); i++) {
    while (up.size() > 1 && area2(up[up.size() - 2], up.back(), pts[i]) > eps)
      up.pop_back();
    while (dn.size() > 1 && area2(dn[dn.size() - 2], dn.back(), pts[i]) < -eps)
      dn.pop_back();
    up.push_back(pts[i]);
    dn.push_back(pts[i]);
  }
  pts = dn;
  for (int i = (int)up.size() - 2; i >= 1; i--) pts.push_back(up[i]);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  int xr, yr;
  cin >> xr >> yr;
  set<pair<int, int> > s;
  vector<PT> v;
  v.push_back(PT(0, 0));
  vector<pair<int, int> > tmp;
  for (int(i) = 0; (i) < (n); (i)++) {
    int t1, t2;
    cin >> t1 >> t2;
    s.insert(make_pair(t1, t2));
    tmp.push_back(make_pair(t1, t2));
  }
  for (int(i) = 0; (i) < (m); (i)++) {
    int t1, t2;
    cin >> t1 >> t2;
    tmp.push_back(make_pair(t1, t2));
  }
  sort(tmp.begin(), tmp.end());
  reverse(tmp.begin(), tmp.end());
  int mx = tmp[0].first, my = 0;
  for (int(i) = 0; (i) < (tmp.size()); (i)++) {
    int x = tmp[i].first, y = tmp[i].second;
    my = max(my, y);
    if (x >= mx or y >= my) v.push_back(PT(x, y));
  }
  v.push_back(PT(mx, 0));
  v.push_back(PT(0, my));
  ConvexHull(v);
  for (int(i) = 0; (i) < (v.size()); (i)++) {
    int xx = int(v[i].x + 0.1), yy = int(v[i].y + 0.1);
    if (s.count(make_pair(xx, yy))) {
      cout << "Max\n";
      return 0;
    }
  }
  cout << "Min\n";
  return 0;
}
