#include <bits/stdc++.h>
using namespace std;
const int maxn = 212;
int h, t, r, n, m, ans = -1, taleh[maxn], talet[maxn], headh[maxn], headt[maxn],
                   cnt[2 * maxn], dis[maxn][maxn];
bool mark[maxn][maxn], s[maxn][maxn], e[maxn][maxn], dead[maxn][maxn], flag;
vector<pair<int, int> > graph[maxn][maxn];
vector<pair<int, int> > anti[maxn][maxn];
queue<pair<pair<int, int>, int> > path;
bool is_valid(int a, int b) {
  if (a + b > r) return false;
  if (a < 0 || b < 0) return false;
  return true;
}
void make_graph() {
  for (int i = 0; i <= r; i++)
    for (int j = 0; j <= r; j++)
      if (is_valid(i, j)) {
        for (int k = 1; k <= n; k++)
          if (is_valid(i - k + headh[k], j + headt[k]) && is_valid(i - k, j))
            graph[i][j].push_back(make_pair(i - k + headh[k], j + headt[k])),
                anti[i - k + headh[k]][j + headt[k]].push_back(make_pair(i, j));
        for (int k = 1; k <= m; k++)
          if (is_valid(i + taleh[k], j - k + talet[k]) && is_valid(i, j - k))
            graph[i][j].push_back(make_pair(i + taleh[k], j - k + talet[k])),
                anti[i + taleh[k]][j - k + talet[k]].push_back(make_pair(i, j));
      }
}
void bfs() {
  mark[0][0] = true;
  pair<int, int> root = make_pair(0, 0);
  path.push(make_pair(root, 0));
  while (!path.empty()) {
    root = path.front().first;
    if (root.first == h && root.second == t) {
      ans = path.front().second;
      return;
    }
    for (int i = 0; i < anti[root.first][root.second].size(); i++) {
      pair<int, int> vrt = anti[root.first][root.second][i];
      if (!mark[vrt.first][vrt.second])
        path.push(make_pair(vrt, path.front().second + 1)),
            mark[vrt.first][vrt.second] = true;
    }
    path.pop();
  }
}
void dfs(int a, int b) {
  s[a][b] = true;
  for (int i = 0; i < graph[a][b].size(); i++) {
    pair<int, int> vrt = graph[a][b][i];
    if (!s[vrt.first][vrt.second])
      dfs(vrt.first, vrt.second);
    else if (!e[vrt.first][vrt.second])
      flag = true;
  }
  e[a][b] = true;
}
void survive(int a, int b) {
  dead[a][b] = true;
  for (int i = 0; i < graph[a][b].size(); i++) {
    pair<int, int> vrt = graph[a][b][i];
    if (!dead[vrt.first][vrt.second]) survive(vrt.first, vrt.second);
    dis[a][b] = max(dis[a][b], dis[vrt.first][vrt.second] + 1);
  }
}
int main() {
  cin >> h >> t >> r;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> headh[i] >> headt[i];
  cin >> m;
  for (int i = 1; i <= m; i++) cin >> taleh[i] >> talet[i];
  make_graph();
  bfs();
  if (ans != -1)
    cout << "Ivan\n" << ans;
  else {
    dfs(h, t);
    if (flag)
      cout << "Draw\n";
    else {
      cout << "Zmey\n";
      survive(h, t);
      for (int i = 0; i < r; i++)
        ans = max(ans, *max_element(dis[i], dis[i] + r));
      cout << ans + 1;
    }
  }
}
