#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const long long EPS = 1e-7;
struct PT {
  long long x, y;
  PT() {}
  PT(long long x, long long 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);
  }
};
long long cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
long long area2(PT a, PT b, PT c) {
  return cross(a, b) + cross(b, c) + cross(c, a);
}
bool between(const PT &a, const PT &b, const PT &c) {
  return (fabs(area2(a, b, c)) < EPS && (a.x - b.x) * (c.x - b.x) <= 0 &&
          (a.y - b.y) * (c.y - b.y) <= 0);
}
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]) >= 0)
      up.pop_back();
    while (dn.size() > 1 && area2(dn[dn.size() - 2], dn.back(), pts[i]) <= 0)
      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]);
  if (pts.size() <= 2) return;
  dn.clear();
  dn.push_back(pts[0]);
  dn.push_back(pts[1]);
  for (int i = 2; i < pts.size(); i++) {
    if (between(dn[dn.size() - 2], dn[dn.size() - 1], pts[i])) dn.pop_back();
    dn.push_back(pts[i]);
  }
  if (dn.size() >= 3 && between(dn.back(), dn[0], dn[1])) {
    dn[0] = dn.back();
    dn.pop_back();
  }
  pts = dn;
}
bool PointInPolygon(vector<PT> &l, PT p) {
  int a = 1, b = l.size() - 1, c;
  if (((l[a].x - l[0].x) * (l[b].y - l[0].y) -
       (l[a].y - l[0].y) * (l[b].x - l[0].x)) > 0)
    swap(a, b);
  if (((l[a].x - l[0].x) * (p.y - l[0].y) -
       (l[a].y - l[0].y) * (p.x - l[0].x)) >= 0 ||
      ((l[b].x - l[0].x) * (p.y - l[0].y) -
       (l[b].y - l[0].y) * (p.x - l[0].x)) <= 0)
    return false;
  while (abs(a - b) > 1) {
    c = (a + b) / 2;
    if (((l[c].x - l[0].x) * (p.y - l[0].y) -
         (l[c].y - l[0].y) * (p.x - l[0].x)) > 0)
      b = c;
    else
      a = c;
  }
  return ((l[b].x - l[a].x) * (p.y - l[a].y) -
          (l[b].y - l[a].y) * (p.x - l[a].x)) < 0;
}
vector<PT> pts, tmp;
const int maxn = 100010;
int n, m;
int x, y;
int a[maxn];
int b[maxn];
int c[maxn];
int d[maxn];
void solve() {
  scanf("%d%d", &n, &m);
  scanf("%d%d", &x, &y);
  for (int i = 0; i < n; i++) scanf("%d%d", a + i, b + i);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", c + i, d + i);
    pts.push_back(PT(c[i], d[i]));
  }
  ConvexHull(pts);
  int u = 0, v = 0;
  for (int i = 0; i < int((pts).size()); i++) {
    if (pts[i].x > pts[u].x) u = i;
    if (pts[i].y > pts[v].y) v = i;
  }
  tmp.push_back(PT(0, 0));
  tmp.push_back(PT(pts[u].x, 0));
  for (int i = u; i < v + 1; i++) tmp.push_back(pts[i]);
  tmp.push_back(PT(0, pts[v].y));
  for (int i = 0; i < n; i++)
    if (!PointInPolygon(tmp, PT(a[i], b[i]))) {
      printf("Max");
      return;
    }
  printf("Min");
}
int main() {
  solve();
  return 0;
}
