#include <bits/stdc++.h>
using namespace std;
const long long UNDEF = -1;
const long long INF = 1e18;
template <typename T>
inline bool chkmax(T &aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T &aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
long long cross(const pair<long long, long long> &a,
                const pair<long long, long long> &b,
                const pair<long long, long long> &c) {
  return (b.first - a.first) * (c.second - a.second) -
         (b.second - a.second) * (c.first - a.first);
}
vector<pair<long long, long long> > convexHullAllowStraightEdges(
    vector<pair<long long, long long> > points) {
  if (points.size() <= 1) return points;
  sort(points.begin(), points.end());
  vector<pair<long long, long long> > h;
  for (auto p : points) {
    while (h.size() >= 2 && cross(h.end()[-2], h.back(), p) > 0) h.pop_back();
    h.push_back(p);
  }
  reverse(points.begin(), points.end());
  int upper = h.size();
  for (auto p : points) {
    while (h.size() > upper && cross(h.end()[-2], h.back(), p) > 0)
      h.pop_back();
    h.push_back(p);
  }
  h.resize(h.size() - 1 - (h[0] == h[1]));
  return h;
}
static char stdinBuffer[1024];
static char *stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char *stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
long long readInt() {
  readAhead(16);
  long long x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n = readInt(), m = readInt();
  long long ox = readInt(), oy = readInt();
  set<pair<long long, long long> > vmin, vmax;
  for (long long i = 0; i < n; i++) {
    long long x = readInt(), y = readInt();
    vmax.insert(make_pair(x, y));
  }
  long long xhi = 0, yhi = 0;
  for (long long i = 0; i < m; i++) {
    long long x = readInt(), y = readInt();
    vmin.insert(make_pair(x, y));
    chkmax(xhi, x);
    chkmax(yhi, y);
  }
  set<pair<long long, long long> > toch;
  for (auto &w : vmin) toch.insert(w);
  for (auto &w : vmax) toch.insert(w);
  toch.insert(make_pair(0, 0));
  toch.insert(make_pair(xhi, 0));
  toch.insert(make_pair(0, yhi));
  vector<pair<long long, long long> > vtoch;
  for (auto &w : toch) vtoch.push_back(w);
  vector<pair<long long, long long> > ch = convexHullAllowStraightEdges(vtoch);
  for (auto &w : ch) {
    if (vmax.find(w) != vmax.end()) {
      printf("Max\n");
      return 0;
    }
  }
  printf("Min\n");
}
