#include <bits/stdc++.h>
using namespace std;
const int maxl = 2 * 100 + 5;
const int DEAD = 2 * 100;
vector<pair<int, int> > v[maxl][maxl];
int marked[maxl][maxl];
int dis[maxl][maxl];
int depth[maxl][maxl];
pair<int, int> a[maxl], b[maxl];
int t, h, R, n, m;
void make_graph() {
  for (int i = 0; i <= R; i++)
    for (int j = 0; j <= (R - i); j++) {
      for (int x = 1; x <= n && x <= i; x++) {
        int newI = i - x + a[x - 1].first, newJ = j + a[x - 1].second;
        if ((newI + newJ) > R) newI = DEAD, newJ = DEAD;
        v[i][j].push_back(make_pair(newI, newJ));
      }
      for (int x = 1; x <= m && x <= j; x++) {
        int newI = i + b[x - 1].first, newJ = j - x + b[x - 1].second;
        if ((newI + newJ) > R) newI = DEAD, newJ = DEAD;
        v[i][j].push_back(make_pair(newI, newJ));
      }
    }
}
void dfs(int x, int y) {
  marked[x][y] = 1;
  int tmp = 0;
  for (int i = 0; i < v[x][y].size(); i++) {
    int newX = v[x][y][i].first, newY = v[x][y][i].second;
    if (marked[newX][newY] == 1) {
      cout << "Draw" << endl;
      exit(0);
    }
    if (marked[newX][newY] == 0) dfs(newX, newY);
    tmp = max(tmp, dis[newX][newY] + 1);
  }
  dis[x][y] = tmp;
  marked[x][y] = 2;
}
int main() {
  cin >> h >> t >> R;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  cin >> m;
  for (int i = 0; i < m; i++) cin >> b[i].first >> b[i].second;
  make_graph();
  for (int i = 0; i < maxl; i++)
    for (int j = 0; j < maxl; j++) depth[i][j] = -1;
  queue<pair<int, int> > q;
  q.push(make_pair(h, t));
  depth[h][t] = 0;
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    for (int i = 0; i < v[x][y].size(); i++) {
      int newX = v[x][y][i].first, newY = v[x][y][i].second;
      if (depth[newX][newY] == -1)
        depth[newX][newY] = depth[x][y] + 1, q.push(make_pair(newX, newY));
    }
    q.pop();
  }
  if (depth[0][0] != -1) {
    cout << "Ivan" << endl;
    cout << depth[0][0] << endl;
    return 0;
  }
  dfs(h, t);
  cout << "Zmey" << endl;
  cout << dis[h][t] << endl;
}
