#include using namespace std; const int INF = 0x3f3f3f3f; const int N = 1010; struct node { int x, y; }a[N], b[N]; int n, m, G[N][N]; bool check(node a, node b, node c) { if(a.x > b.x && a.x > c.x) return true; if(a.x < b.x && a.x < c.x) return true; if(a.y < b.y && a.y < c.y) return true; if(a.y > b.y && a.y > c.y) return true; return false; } double fun(node a, node b, node c) { double x1 = a.x - c.x; double y1 = a.y - c.y; double x2 = b.x - c.x; double y2 = b.y - c.y; return x1 * y2 - x2 * y1; } void Floyd() { for(int i = 1; i <= m; i ++) { for(int j = 1; j <= m; j ++) { if(G[j][i] == INF) continue; for(int k = 1; k <= m; k ++) { G[j][k] = min(G[j][k], G[j][i] + G[i][k]); } } } } int main() { while(cin >> n) { for(int i = 1; i <= n; i ++) { scanf("%d%d", &a[i].x, &a[i].y); } scanf("%d", &m); for(int i = 1; i <= m; i ++) { scanf("%d%d", &b[i].x, &b[i].y); } for(int i = 1; i <= m; i ++) { for(int j = 1; j <= m; j ++) { G[i][j] = INF; } } for(int i = 1; i <= m; i ++) { for(int j = 1; j <= m; j ++) { bool flag = true; for(int k = 1; k <= n; k ++) { if(fun(a[k], b[j], b[i]) < 0) flag = false; if(fun(a[k], b[j], b[i]) == 0 && check(a[k], b[j], b[i])) flag = false; if(!flag) break; } if(flag) G[i][j] = 1; } } Floyd(); int ans = INF; for(int i = 1; i <= m; i ++) { ans = min(ans, G[i][i]); } if(ans > m) printf("ToT\n"); else printf("%d\n",m - ans); } return 0; } /* ┏┛┻━━━┛┻┓ ┃|||||||┃ ┃   ━   ┃ ┃ ┳┛  ┗┳  ┃ ┃       ┃ ┃   ┻   ┃ ┃       ┃ ┗━┓   ┏━┛   ┃ 史 ┃     ┃ 诗 ┃     ┃ 之 ┃     ┃ 宠 ┃   ┃   ┗━━━┓   ┃  ┣┓   ┃  ┃   ┗┓┓┏━┳┓┏┛    ┃┫┫ ┃┫┫    ┗┻┛ ┗┻┛ */