#include <bits/stdc++.h>
using namespace std;
template <typename C>
void MA(C& a, C b) {
  if (a < b) a = b;
}
template <typename C>
void MI(C& a, C b) {
  if (a > b) a = b;
}
int n, m;
int ta[101001], tb[101001];
int tc[101001], td[101001];
int mas = 0, mis = 0;
struct pkt {
  int x, y;
  int kt;
};
bool il_wek(pkt a, pkt b) {
  long long pom = a.x * 1ll * b.y - a.y * 1ll * b.x;
  if (pom != 0) return pom > 0;
  return a.kt < b.kt;
}
vector<pkt> pkty;
void maks() {
  puts("Max");
  exit(0);
}
int x, y;
bool wyp(pkt a, pkt b, pkt c) {
  return (b.x - a.x) * 1ll * (c.y - a.y) < (c.x - a.x) * 1ll * (b.y - a.y);
}
int main() {
  scanf("%d%d", &n, &m);
  scanf("%*d%*d");
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &ta[i], &tb[i]);
    pkty.push_back({ta[i], tb[i], 0});
  }
  int mtc = 0, mtd = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &tc[i], &td[i]);
    pkty.push_back({tc[i], td[i], 1});
    MA(mtc, tc[i]);
    MA(mtd, td[i]);
  }
  pkty.push_back({mtc, 0, 1});
  pkty.push_back({0, mtd, 1});
  mas = 0;
  mis = 0;
  for (int i = 0; i < n; i++) MA(mas, ta[i]);
  for (int i = 0; i < m; i++) MA(mis, tc[i]);
  if (mas >= mis) maks();
  mas = 0;
  mis = 0;
  for (int i = 0; i < n; i++) MA(mas, tb[i]);
  for (int i = 0; i < m; i++) MA(mis, td[i]);
  if (mas >= mis) maks();
  sort((pkty).begin(), (pkty).end(), il_wek);
  vector<pkt> o;
  for (int i = 0; i < pkty.size(); i++) {
    while (o.size() >= 2 && wyp(o[((int)(o).size()) - 2], o.back(), pkty[i]))
      o.pop_back();
    if (o.empty() || pkty[i].x != o.back().x || pkty[i].y != o.back().y)
      o.push_back(pkty[i]);
  }
  for (int i = 0; i < ((int)(o).size()); i++) {
    if (o[i].kt == 0) maks();
  }
  puts("Min");
}
