#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 60;
struct P {
  int x, y;
  int typ;
  P operator-(const P &b) { return (P){x - b.x, y - b.y}; }
  long long operator*(const P &b) { return 1ll * x * b.y - 1ll * y * b.x; }
} p[N], conv[N], sta;
bool cmp(const P &a, const P &b) {
  if (a.x == b.x && a.y == b.y) {
    return a.typ < b.typ;
  }
  if (a.x == b.x) return a.y > b.y;
  return a.x < b.x;
}
int n, m, top;
int main(int argc, char *argv[]) {
  scanf("%d%d", &n, &m);
  scanf("%d%d", &sta.x, &sta.y);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y), p[i].typ = 0;
  for (int i = n + 1; i <= m + n; i++)
    scanf("%d%d", &p[i].x, &p[i].y), p[i].typ = 1;
  sort(p + 1, p + 1 + m + n, cmp);
  for (int i = 1; i <= m + n; i++) {
    if (i > 1 && p[i].x == p[i - 1].x && p[i].y == p[i - 1].y) continue;
    while (top && p[i].y > conv[top].y) --top;
    while (top >= 2 && (conv[top] - conv[top - 1]) * (p[i] - conv[top]) > 0)
      --top;
    conv[++top] = p[i];
  }
  for (int i = 1; i <= (top); ++i)
    if (conv[i].typ == 0) {
      puts("Max");
      return 0;
    }
  puts("Min");
  return 0;
}
