#include <bits/stdc++.h>
using namespace std;
int N, M;
struct P {
  int x, y, c;
  P() {}
  P(int x, int y, int c) {
    this->x = x;
    this->y = y;
    this->c = c;
  }
  bool operator<(const P &t) const { return x != t.x ? x < t.x : y > t.y; }
  bool operator==(const P &t) const { return x == t.x && y == t.y; }
} D[200020 + 1], inp[200020 + 1];
int Hull[200020 + 1], hn;
inline long double dist(const P &a, const P &b) {
  return sqrt((long double)(a.x - b.x) * (a.x - b.x) +
              (long double)(a.y - b.y) * (a.y - b.y));
}
inline long long ccw(const P &a, const P &b, const P &c) {
  return (long long)a.x * b.y + (long long)b.x * c.y + (long long)c.x * a.y -
         (long long)b.x * a.y - (long long)c.x * b.y - (long long)a.x * c.y;
}
int main() {
  scanf("%d%d", &N, &M);
  scanf("%*d%*d");
  for (int i = 1; i <= N + M; i++) {
    scanf("%d%d", &inp[i].x, &inp[i].y);
    inp[i].c = i;
  }
  int max_x = 0, max_y = 0;
  for (int i = 1; i <= N + M; i++) {
    if (inp[max_x].x < inp[i].x ||
        (inp[max_x].x == inp[i].x && inp[max_x].y > inp[i].y))
      max_x = i;
    if (inp[max_y].y < inp[i].y ||
        (inp[max_y].y == inp[i].y && inp[max_y].x > inp[i].x))
      max_y = i;
  }
  int SZ = 0;
  for (int i = 1; i <= N + M; i++) {
    if (inp[i].y > inp[max_x].y && inp[i].x > inp[max_y].x)
      D[++SZ] = inp[i];
    else if (inp[i].x == inp[max_x].x || inp[i].y == inp[max_y].y)
      D[++SZ] = inp[i];
  }
  std::sort(D + 1, D + SZ + 1);
  if (SZ == 1) {
    if (D[1].c <= N)
      printf("Max");
    else
      printf("Min");
    return 0;
  }
  for (int i = 1; i <= 2; i++) Hull[i] = i;
  hn = 2;
  for (int i = 3; i <= SZ; i++) {
    while (hn >= 2 && ccw(D[Hull[hn - 1]], D[Hull[hn]], D[i]) > 0)
      Hull[hn--] = 0;
    if (D[i] == D[Hull[hn]]) {
      if (D[Hull[hn]].c > N && D[i].c <= N) Hull[hn] = i;
    } else
      Hull[++hn] = i;
  }
  bool ans = 0;
  for (int i = 1; i <= hn; i++)
    if (D[Hull[i]].c <= N) {
      ans = 1;
      break;
    }
  printf("%s", ans ? "Max" : "Min");
  return 0;
}
