#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
int H, T, R, n, m, num;
vector<pair<pair<int, int>, pair<int, int> > > pere;
int d[700][700];
int timer = 0;
void bfs(int h, int t) {
  d[h][t] = 0;
  queue<pair<int, int> > q;
  q.push(make_pair(h, t));
  while (!q.empty()) {
    pair<int, int> cur = q.front();
    q.pop();
    for (int i = 0; i < num; i++) {
      pair<int, int> add = pere[i].first;
      pair<int, int> next =
          make_pair(cur.first + add.first, cur.second + add.second);
      if (pere[i].second.first <= cur.first &&
          pere[i].second.second <= cur.second && next.first >= 0 &&
          next.second >= 0 && next.first + next.second <= R &&
          d[next.first][next.second] == -1) {
        d[next.first][next.second] = d[cur.first][cur.second] + 1;
        q.push(next);
      }
    }
  }
}
bool be[700][700];
int color[700][700];
bool dfs(int h, int t) {
  be[h][t] = true;
  color[h][t] = 1;
  for (int i = 0; i < num; i++) {
    pair<int, int> add = pere[i].first;
    pair<int, int> next = make_pair(h + add.first, t + add.second);
    if (pere[i].second.first <= h && pere[i].second.second <= t &&
        next.first >= 0 && next.second >= 0 && next.first + next.second <= R) {
      if (!be[next.first][next.second]) {
        bool f = dfs(next.first, next.second);
        if (f) return true;
      } else {
        if (color[next.first][next.second]) return true;
      }
    }
  }
  color[h][t] = 0;
  return false;
}
int answer[700][700];
int dfs1(int h, int t) {
  if (answer[h][t] != -1) return answer[h][t];
  int ans = 1;
  for (int i = 0; i < num; i++) {
    pair<int, int> add = pere[i].first;
    pair<int, int> next = make_pair(h + add.first, t + add.second);
    if (pere[i].second.first <= h && pere[i].second.second <= t &&
        next.first >= 0 && next.second >= 0 && next.first + next.second <= R)
      ans = max(ans, dfs1(next.first, next.second) + 1);
  }
  return answer[h][t] = ans;
}
void solve() {
  cin >> H >> T >> R;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int q, w;
    cin >> q >> w;
    q -= i;
    pere.push_back(make_pair(make_pair(q, w), make_pair(i, 0)));
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int q, w;
    cin >> q >> w;
    w -= i;
    pere.push_back(make_pair(make_pair(q, w), make_pair(0, i)));
  }
  sort(pere.begin(), pere.end());
  pere.resize(unique(pere.begin(), pere.end()) - pere.begin());
  num = pere.size();
  memset(d, -1, sizeof d);
  bfs(H, T);
  if (d[0][0] != -1) {
    cout << "Ivan\n";
    cout << d[0][0];
    return;
  }
  bool f = dfs(H, T);
  if (f) {
    cout << "Draw";
    return;
  }
  memset(be, false, sizeof be);
  memset(answer, -1, sizeof answer);
  int z = dfs1(H, T);
  cout << "Zmey\n";
  cout << z;
}
