#include <bits/stdc++.h>
using namespace std;
const int N = 100007;
struct pt {
  long long x, y;
  pt(long long x = 0, long long y = 0) : x(x), y(y) {}
  pt operator-(const pt &o) const { return pt(x - o.x, y - o.y); }
  long long len() const { return x * x + y * y; }
} a[N], b[N], h[N];
int n, m, size;
long long cross(const pt &u, const pt &v) { return u.x * v.y - u.y * v.x; }
bool cmp(const pt &u, const pt &v) { return cross(u, v) > 0; }
bool ccw(pt &a, pt &b, pt &c) {
  pt u(b.x - a.x, b.y - a.y);
  pt v(c.x - b.x, c.y - b.y);
  return cross(u, v) > 0;
}
void convex_hull() {
  sort(b, b + m, cmp);
  for (int i = 0; i < (m); ++i) {
    while (size >= 2 && !ccw(h[size - 2], h[size - 1], b[i])) --size;
    h[size++] = b[i];
  }
}
bool isInside(pt A) {
  int l = 0, r = size - 1;
  while (l < r) {
    int m = (l + r + 1) / 2;
    if (cross(h[m], A) > 0)
      l = m;
    else
      r = m - 1;
  }
  assert(l != size - 1);
  pt B = h[l];
  pt C = h[l + 1];
  if (cross(A - B, A - C) == 0) return false;
  if (cross(A, B) == 0 && A.len() <= B.len()) return true;
  if (cross(A, C) == 0 && A.len() <= C.len()) return true;
  if (cross(C - B, A - B) < 0) return false;
  return true;
}
void solve() {
  scanf("%d%d", &n, &m);
  pt S;
  scanf("%lld%lld", &S.x, &S.y);
  for (int i = 0; i < (n); ++i) scanf("%lld%lld", &a[i].x, &a[i].y);
  long long maxy = 0, maxx = 0;
  for (int i = 0; i < (m); ++i) {
    scanf("%lld%lld", &b[i].x, &b[i].y);
    maxx = max(maxx, b[i].x);
    maxy = max(maxy, b[i].y);
  }
  b[m++] = pt(maxx, 0);
  b[m++] = pt(0, maxy);
  convex_hull();
  for (int i = 0; i < (n); ++i) {
    if (!isInside(a[i])) {
      puts("Max");
      return;
    }
  }
  puts("Min");
}
void testGen() {
  FILE *f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  cerr << fixed;
  cerr.precision(3);
  cout << fixed;
  cout.precision(9);
  solve();
  return 0;
}
