#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  long long operator^(const Point &p) { return x * p.y - y * p.x; }
  Point(long long xx, long long yy) { x = xx, y = yy; }
  bool operator<(const Point &p) const {
    return make_pair(x, y) < make_pair(p.x, p.y);
  }
  Point operator-(const Point &p) const { return Point(x - p.x, y - p.y); }
  bool operator>(const Point &p) const {
    return make_pair(x, y) > make_pair(p.x, p.y);
  }
};
long long INF = 2e9;
struct ConvexHull {
  vector<Point> hull, lower, upper;
  int n;
  bool ccw(Point p, Point q, Point r) { return ((q - p) ^ (r - q)) > 0; }
  long long cross(Point p, Point q, Point r) { return (q - p) ^ (r - q); }
  void init(vector<Point> &poly) {
    hull.clear();
    lower.clear();
    upper.clear();
    sort(poly.begin(), poly.end());
    for (int i = 0; i < poly.size(); i++) {
      while (lower.size() >= 2 and
             !ccw(lower[lower.size() - 2], lower.back(), poly[i])) {
        lower.pop_back();
      }
      lower.push_back(poly[i]);
    }
    for (int i = (int)poly.size() - 1; i >= 0; i--) {
      while (upper.size() >= 2 and
             !ccw(upper[upper.size() - 2], upper.back(), poly[i])) {
        upper.pop_back();
      }
      upper.push_back(poly[i]);
    }
    hull = lower;
    for (int i = 1; i + 1 < upper.size(); i++) hull.push_back(upper[i]);
    n = hull.size();
  }
  int sign(long long x) {
    if (x < 0) return -1;
    return x > 0;
  }
  int crossOp(Point p, Point q, Point r) {
    long long c = (q - p) ^ (r - q);
    if (c < 0) return -1;
    return (c > 0);
  }
  bool contain(Point p, int &a, int &b) {
    if (p.x < lower[0].x || p.x > lower.back().x) return 0;
    int id = lower_bound(lower.begin(), lower.end(), Point(p.x, -INF)) -
             lower.begin();
    if (lower[id].x == p.x) {
      if (lower[id].y > p.y) return 0;
    } else {
      if (crossOp(lower[id - 1], lower[id], p) < 0) return 0;
      if (crossOp(lower[id - 1], lower[id], p) == 0) {
        a = id - 1;
        b = id;
        return 1;
      }
    }
    id = lower_bound(upper.begin(), upper.end(), Point(p.x, INF),
                     greater<Point>()) -
         upper.begin();
    if (upper[id].x == p.x) {
      if (upper[id].y < p.y) return 0;
    } else {
      if (crossOp(upper[id - 1], upper[id], p) < 0) return 0;
      if (crossOp(upper[id - 1], upper[id], p) == 0) {
        a = id - 1 + lower.size() - 1;
        b = id + lower.size() - 1;
        return 1;
      }
    }
    a = b = -1;
    return 1;
  }
} H;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  vector<Point> P1, P2;
  P2.push_back(Point(0, 0));
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    P1.push_back(Point(x, y));
  }
  long long xmax = 0, ymax = 0;
  for (int i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    xmax = max(xmax, x);
    ymax = max(ymax, y);
    P2.push_back(Point(x, y));
  }
  P2.push_back(Point(0, ymax));
  P2.push_back(Point(xmax, 0));
  H.init(P2);
  set<Point> s;
  for (auto t : H.hull) s.insert(t);
  for (auto p : P1) {
    int a, b;
    bool f = H.contain(p, a, b);
    if (!f or a != -1 or s.find(p) != s.end() or p.x == xmax or p.y == ymax) {
      cout << "Max" << endl;
      exit(0);
    }
  }
  cout << "Min" << endl;
}
