#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  Point() {}
  Point(long long x, long long y) : x(x), y(y) {}
};
long long det(long long x1, long long y1, long long x2, long long y2) {
  return x1 * y2 - x2 * y1;
}
bool moveLeft(Point& a, Point& b, Point& c) {
  return det(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y) > 0;
}
long long maxY, maxX;
long long maxUp, maxRight;
vector<Point> convexHull(vector<Point> p) {
  p.push_back(Point(maxX, 0));
  p.push_back(Point(0, maxY));
  sort(p.begin(), p.end(), [](const Point& a, const Point& b) {
    return det(a.x, a.y, b.x, b.y) > 0;
  });
  vector<Point> ch;
  ch.push_back(Point(0, 0));
  ch.push_back(p[0]);
  int m = 2;
  for (int i = 1; i < p.size(); i++) {
    while (!moveLeft(ch[m - 2], ch[m - 1], p[i])) {
      m--;
      ch.pop_back();
    }
    ch.push_back(p[i]);
    m++;
  }
  return ch;
}
long double dist(Point a, Point b) {
  return sqrtl((long double)(a.x - b.x) * (a.x - b.x) +
               (a.y - b.y) * (a.y - b.y));
}
bool onSegm(Point a, Point b, Point p) {
  return det(b.x - a.x, b.y - a.y, p.x - a.x, p.y - a.y) == 0 &&
         fabsl(dist(a, b) - dist(a, p) - dist(b, p)) < 1e-3;
}
bool inside(Point a, Point b, Point c, Point p) {
  if (onSegm(b, c, p)) {
    return false;
  }
  return det(b.x - a.x, b.y - a.y, p.x - a.x, p.y - a.y) >= 0 &&
         det(c.x - b.x, c.y - b.y, p.x - b.x, p.y - b.y) >= 0 &&
         det(a.x - c.x, a.y - c.y, p.x - c.x, p.y - c.y) >= 0;
}
bool inside(vector<Point>& p, Point a) {
  int l = 1, r = (int)p.size() - 1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (moveLeft(p[0], a, p[mid])) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  int i = max(l - 1, 1);
  for (int it = 0; it < (int)(4); it++) {
    if (i + 1 < (int)p.size()) {
      if (inside(p[0], p[i], p[i + 1], a)) {
        return true;
      }
    }
    i++;
  }
  return false;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<Point> p, q;
  int _x, _y;
  cin >> _x >> _y;
  p = vector<Point>(n);
  q = vector<Point>(m);
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d %d", &_x, &_y);
    p[i] = Point(_x, _y);
  }
  for (int i = 0; i < (int)(m); i++) {
    scanf("%d %d", &_x, &_y);
    q[i] = Point(_x, _y);
  }
  maxY = -1e18;
  maxX = -1e18;
  maxUp = maxRight = -1e18;
  for (int i = 0; i < (int)(m); i++) {
    maxY = max(maxY, q[i].y);
    maxX = max(maxX, q[i].x);
  }
  for (int i = 0; i < (int)(m); i++) {
    if (q[i].y == maxY) {
      maxUp = max(maxUp, q[i].x);
    }
    if (q[i].x == maxX) {
      maxRight = max(maxRight, q[i].y);
    }
  }
  q = convexHull(q);
  for (int i = 0; i < (int)(n); i++) {
    if (!inside(q, p[i])) {
      puts("Max");
      return 0;
    }
  }
  puts("Min");
  return 0;
}
