/* -*- coding: utf-8 -*- * * 2194.cc: No.2194 兄弟の掛け引き - yukicoder */ #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); int n0 = -1, n1 = -1; if (c <= b && c % a == 0) n0 = c / a; if ((c + b) % a == 0) n1 = (c + b) / a; if (n0 < 0 && n1 < 0) puts("-1"); else { if (n0 >= 0) printf("%d\n", n0); if (n1 >= 0) printf("%d\n", n1); } return 0; }