while True: try: m,n,k = map(int, input().split()) mogu = set() for _ in range(k): x,y = map(int, input().split()) mogu.add((x-1,y-1)) dp_all = [[0]*n for _ in range(m)] dp_mogu = [[0]*n for _ in range(m)] if n == 1 or m == 1: if k == 0: print('1.00') else: print('0.00') continue for i in range(1,n): dp_all[0][i] = 1 if (0,i) in mogu: dp_mogu[0][i] = 1 else: dp_mogu[0][i] = dp_mogu[0][i-1] for i in range(1,m): dp_all[i][0] = 1 if (i,0) in mogu: dp_mogu[i][0] = 1 else: dp_mogu[i][0] = dp_mogu[i-1][0] for i in range(1,m-1): for j in range(1,n-1): dp_all[i][j] = dp_all[i-1][j] + dp_all[i][j-1] if (i,j) in mogu: dp_mogu[i][j] = dp_all[i][j] else: dp_mogu[i][j] = dp_mogu[i-1][j] + dp_mogu[i][j-1] for i in range(1,m-1): dp_all[i][n-1] = dp_all[i-1][n-1] * 2 + dp_all[i][n-2] if (i,n-1) in mogu: dp_mogu[i][n-1] = dp_all[i][n-1] else: dp_mogu[i][n-1] = 2 * dp_mogu[i-1][n-1] + dp_mogu[i][n-2] for j in range(1,n-1): dp_all[m-1][j] = dp_all[m-1][j-1] * 2 + dp_all[m-2][j] if (m-1,j) in mogu: dp_mogu[m-1][j] = dp_all[m-1][j] else: dp_mogu[m-1][j] = 2 * dp_mogu[m-1][j-1] + dp_mogu[m-2][j] dp_all[m-1][n-1] = dp_all[m-1][n-2]*2 + dp_all[m-2][n-1]*2 dp_mogu[m-1][n-1] = dp_mogu[m-1][n-2]*2 + dp_mogu[m-2][n-1]*2 print("{:.2f}".format(1-dp_mogu[m-1][n-1]/dp_all[m-1][n-1])) except: break