#include <bits/stdc++.h>
using namespace std;
int n, m;
int x, y;
vector<pair<long long int, long long int> > s;
vector<pair<long long int, long long int> > t;
long long int maxy = 0;
void init() {
  cin >> n >> m;
  cin >> x >> y;
  for (int i = 0; i < n; i++) {
    pair<long long int, long long int> temp;
    cin >> temp.first >> temp.second;
    t.push_back(temp);
  }
  for (int i = 0; i < m; i++) {
    pair<long long int, long long int> temp;
    cin >> temp.first >> temp.second;
    s.push_back(temp);
    maxy = max(maxy, temp.second);
  }
  sort(s.begin(), s.end());
  sort(t.begin(), t.end());
}
long long int cross(pair<long long int, long long int> a,
                    pair<long long int, long long int> b,
                    pair<long long int, long long int> c) {
  return (b.first - a.first) * (c.second - b.second) -
         (b.second - a.second) * (c.first - b.first);
}
bool process() {
  if (x < 0 && y < 0) return true;
  vector<pair<long long int, long long int> > stck;
  pair<long long int, long long int> temp;
  temp.first = 0;
  temp.second = maxy;
  stck.push_back(temp);
  for (int i = 0; i < m; i++) {
    while (stck.size() >= 2 &&
           cross(stck[stck.size() - 2], stck[stck.size() - 1], s[i]) >= 0)
      stck.pop_back();
    stck.push_back(s[i]);
  }
  int ptr = 0;
  for (int i = 0; i < n; i++) {
    while (ptr != stck.size() - 1 && stck[ptr + 1].first <= t[i].first) ptr++;
    if ((ptr == stck.size() - 1) ||
        (cross(stck[ptr], stck[ptr + 1], t[i]) >= 0))
      return false;
  }
  return true;
}
int main() {
  init();
  if (process())
    cout << "Min" << endl;
  else
    cout << "Max" << endl;
  return 0;
}
