#include <bits/stdc++.h>
using namespace std;
int R, n, m;
pair<int, int> q[40010], eh[210], et[210];
int dis[210][210];
bool vis[210][210];
void bfs(int head, int tail) {
  memset(dis, 0xff, sizeof(dis));
  q[0] = make_pair(head, tail);
  dis[head][tail] = 0;
  for (int h = 0, t = 1; h < t; ++h) {
    head = q[h].first;
    tail = q[h].second;
    for (int i = 1; i <= n && i <= head; ++i) {
      q[t] = make_pair(head - i + eh[i].first, tail + eh[i].second);
      if (q[t].first + q[t].second <= R && dis[q[t].first][q[t].second] == -1) {
        dis[q[t].first][q[t].second] = dis[head][tail] + 1;
        ++t;
      }
    }
    for (int i = 1; i <= m && i <= tail; ++i) {
      q[t] = make_pair(head + et[i].first, tail - i + et[i].second);
      if (q[t].first + q[t].second <= R && dis[q[t].first][q[t].second] == -1) {
        dis[q[t].first][q[t].second] = dis[head][tail] + 1;
        ++t;
      }
    }
  }
}
bool dfs(int head, int tail) {
  vis[head][tail] = true;
  for (int i = 1; i <= head && i <= n; ++i) {
    int h = head - i + eh[i].first, t = tail + eh[i].second;
    if (h + t <= R) {
      if (dis[h][t] < dis[head][tail] + 1) {
        dis[h][t] = dis[head][tail] + 1;
        if (vis[h][t])
          return true;
        else if (dfs(h, t))
          return true;
      }
    } else {
      dis[0][0] = max(dis[0][0], dis[head][tail] + 1);
    }
  }
  for (int i = 1; i <= tail && i <= m; ++i) {
    int h = head + et[i].first, t = tail - i + et[i].second;
    if (h + t <= R) {
      if (dis[h][t] < dis[head][tail] + 1) {
        dis[h][t] = dis[head][tail] + 1;
        if (vis[h][t])
          return true;
        else if (dfs(h, t))
          return true;
      }
    } else {
      dis[0][0] = max(dis[0][0], dis[head][tail] + 1);
    }
  }
  vis[head][tail] = false;
  return false;
}
int main() {
  int h, t;
  while (cin >> h >> t >> R) {
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> eh[i].first >> eh[i].second;
    cin >> m;
    for (int i = 1; i <= m; ++i) cin >> et[i].first >> et[i].second;
    bfs(h, t);
    if (dis[0][0] != -1) {
      puts("Ivan");
      cout << dis[0][0] << endl;
    } else {
      memset(dis, 0xff, sizeof(dis));
      memset(vis, 0, sizeof(vis));
      dis[h][t] = 0;
      if (dfs(h, t)) {
        puts("Draw");
      } else {
        puts("Zmey");
        cout << dis[0][0] << endl;
      }
    }
  }
  return 0;
}
