import java.util.*; public class Main { static long gcd(long a,long b){ return b == 0 ? a : gcd(b, a%b); } static long lcm(long a, long b){ return a*b/gcd(a, b); } static int[] dx = {1,0,-1,0}; static int[] dy = {0,1,0,-1}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); long p = sc.nextLong(); long q = sc.nextLong(); int n = sc.nextInt(); if(p>q){ long tmp = p; p = q; q = tmp; } int[] x = new int[n]; int[] y = new int[n]; for(int i=0;i0){ long g = gcd(p, q); if(((p/g)+(q/g))%2==1){ for(int i=0;i