#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-22;
struct Point {
  long long x, y;
  int id;
  Point() {}
  Point(long long a, long long b, int _id) {
    x = a;
    y = b;
    id = _id;
  }
  Point operator-(const Point &a) const { return Point(x - a.x, y - a.y, 0); }
  long long operator*(const Point &a) const { return (a.x * x) + (a.y * y); }
  pair<long long, long long> PII() { return make_pair(x, y); }
  bool operator<(const Point &a) const {
    return make_pair(y, x) < make_pair(a.y, a.x);
  }
  bool operator==(const Point &a) const {
    return make_pair(y, x) == make_pair(a.y, a.x);
  }
};
long long cross(Point a, Point b) { return ((a.x * b.y) - (a.y * b.x)); }
long long area(Point a, Point b, Point c) {
  return (cross(a, b) + cross(b, c) + cross(c, a));
}
vector<Point> v;
vector<Point> hull;
set<pair<int, int> > l;
void ConvexHull(vector<Point> &pts) {
  sort(pts.begin(), pts.end());
  pts.erase(unique(pts.begin(), pts.end()), pts.end());
  vector<Point> up, dn;
  for (int i = 0; i < pts.size(); i++) {
    while (up.size() > 1 && area(up[up.size() - 2], up.back(), pts[i]) > eps)
      up.pop_back();
    while (dn.size() > 1 && area(dn[dn.size() - 2], dn.back(), pts[i]) < -eps)
      dn.pop_back();
    up.push_back(pts[i]);
    dn.push_back(pts[i]);
  }
  pts = dn;
  for (int i = (int)up.size() - 2; i >= 1; i--) pts.push_back(up[i]);
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int a, b;
  scanf("%d %d", &a, &b);
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    l.insert(make_pair(a, b));
    v.push_back(Point(a, b, 1));
  }
  int mx_x = -1;
  int mx_y = -1;
  for (int i = 1; i <= m; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    v.push_back(Point(a, b, 2));
    mx_x = max(mx_x, a);
    mx_y = max(mx_y, b);
  }
  v.push_back(Point(mx_x, 0, 2));
  v.push_back(Point(0, mx_y, 2));
  v.push_back(Point(0, 0, 2));
  ConvexHull(v);
  for (int i = 0; i < v.size(); i++) {
    if (l.find(v[i].PII()) != l.end()) {
      printf("Max\n");
      return 0;
    }
  }
  printf("Min\n");
  return 0;
}
