#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long long maxn = 2e2 + 10, inf = 4e18, mod = 1e9 + 7;
const long double pi = 3.14159265359, eps = 1e-9;
long long h, t, R, dp[maxn][maxn], n, m;
pair<long long, long long> H[maxn], T[maxn];
unsigned short int mk[maxn][maxn];
vector<pair<long long, long long> > vec;
vector<pair<long long, long long> > vld(pair<long long, long long> p) {
  vec.clear();
  for (int i = 1; i <= min(n, p.first); i++) {
    vec.push_back(make_pair(p.first + H[i].first - i, p.second + H[i].second));
  }
  for (int i = 1; i <= min(m, p.second); i++) {
    vec.push_back(make_pair(p.first + T[i].first, p.second + T[i].second - i));
  }
  return vec;
}
long long dfs(pair<long long, long long> v) {
  if (mk[v.first][v.second] == 2)
    return dp[v.first][v.second];
  else if (mk[v.first][v.second] == 1)
    return -1;
  mk[v.first][v.second] = 1;
  dp[v.first][v.second] = 1;
  long long chom;
  for (pair<long long, long long> pn : vld(v)) {
    if (pn.first + pn.second > R) continue;
    chom = dfs(pn);
    if (chom == -1) return -1;
    dp[v.first][v.second] =
        max(dp[v.first][v.second], dp[pn.first][pn.second] + 1);
  }
  mk[v.first][v.second] = 2;
  return dp[v.first][v.second];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> h >> t >> R;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> H[i].first >> H[i].second;
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    cin >> T[i].first >> T[i].second;
  }
  deque<pair<long long, long long> > q;
  long long dis[maxn][maxn];
  memset(dis, 69, sizeof(dis));
  q.push_back(make_pair(h, t));
  dis[h][t] = 0;
  pair<long long, long long> pr;
  while (q.size()) {
    pr = q.back();
    q.pop_back();
    for (pair<long long, long long> pn : vld(pr)) {
      if (pn.first + pn.second > R) continue;
      if (dis[pn.first][pn.second] > dis[pr.first][pr.second] + 1) {
        dis[pn.first][pn.second] = dis[pr.first][pr.second] + 1;
        q.push_front(pn);
      }
    }
  }
  if (dis[0][0] < inf) {
    cout << "Ivan" << endl << dis[0][0];
    return 0;
  }
  long long chom = dfs(make_pair(h, t));
  if (chom == -1) return cout << "Draw", 0;
  cout << "Zmey" << endl << chom;
  return 0;
}
