{"problem":{"name":"Bowls and Dishes","description":{"content":"We have $N$ dishes numbered $1, 2, \\dots, N$ and $M$ conditions numbered $1, 2, \\dots, M$.   Condition $i$ is satisfied when both Dish $A_i$ and Dish $B_i$ have (one or more) balls on them.   There ar","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc190_c"},"statements":[{"statement_type":"Markdown","content":"We have $N$ dishes numbered $1, 2, \\dots, N$ and $M$ conditions numbered $1, 2, \\dots, M$.  \nCondition $i$ is satisfied when both Dish $A_i$ and Dish $B_i$ have (one or more) balls on them.  \nThere are $K$ people numbered $1, 2, \\dots, K$. Person $i$ will put a ball on Dish $C_i$ or Dish $D_i$.  \nAt most how many conditions will be satisfied?\n\n## Constraints\n\n*   All values in input are integers.\n*   $2 ≤ N ≤ 100$\n*   $1 ≤ M ≤ 100$\n*   $1 ≤ A_i < B_i ≤ N$\n*   $1 ≤ K ≤ 16$\n*   $1 ≤ C_i < D_i ≤ N$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $B_1$\n$\\vdots$\n$A_M$ $B_M$\n$K$\n$C_1$ $D_1$\n$\\vdots$\n$C_K$ $D_K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc190_c","tags":[],"sample_group":[["4 4\n1 2\n1 3\n2 4\n3 4\n3\n1 2\n1 3\n2 3","2\n\nFor example, if People $1, 2, 3$ put their balls on Dishes $1, 3, 2$, respectively, Conditions $1$ and $2$ will be satisfied."],["4 4\n1 2\n1 3\n2 4\n3 4\n4\n3 4\n1 2\n2 4\n2 4","4\n\nFor example, if People $1, 2, 3, 4$ put their balls on Dishes $3, 1, 2, 4$, respectively, all conditions will be satisfied."],["6 12\n2 3\n4 6\n1 2\n4 5\n2 6\n1 5\n4 5\n1 3\n1 2\n2 6\n2 3\n2 5\n5\n3 5\n1 4\n2 6\n4 6\n5 6","9"]],"created_at":"2026-03-03 11:01:13"}}