Let's denote the number of schools having exactly a certain combination of facilities using set notation. For example, N({F1}) is the number of schools with only facility F1, and N({F1, F2}) is the number of schools with only facilities F1 and F2. The total number of schools with facility F1 (and possibly others) is denoted by |F1|.
From the problem statement, we can summarize the given information:
Total schools with at least one facility = $600 - 80 = 520$.
$N(\{F1\}) = 25$, $N(\{F2\}) = 30$, $N(\{F3\}) = 26$, $N(\{F4\}) = 20$.
$N(\{F1, F2, F3, F4\}) = 40$.
$N(\{F2, F3\}) = 26$.
$N(\{F3, F4\}) = 24$.
$N(\{F2, F4\}) = 45$.
The number of schools with exactly three facilities is the same. Let this number be $x$. So, $N(\{F1, F2, F3\}) = N(\{F1, F2, F4\}) = N(\{F1, F3, F4\}) = N(\{F2, F3, F4\}) = x$.
$|F2| = 313$.
$|F1 \cap F2| = 162$.
$|F1| = |F4|$.
We need to find the number of schools having only facilities F1 and F3, which is $N(\{F1, F3\})$. Let's call this value $y$.
Let the other unknown "exactly two" facility counts be $z = N(\{F1, F2\})$ and $w = N(\{F1, F4\})$.
First, we use the information about the total counts for intersections and individual facilities to find the values of $x$ and $z$.
The total number of schools with both F1 and F2, $|F1 \cap F2|$, is the sum of all regions common to both F1 and F2:
$|F1 \cap F2| = N(\{F1, F2\}) + N(\{F1, F2, F3\}) + N(\{F1, F2, F4\}) + N(\{F1, F2, F3, F4\})$
$162 = z + x + x + 40$
$z + 2x = 122 \quad \cdots (1)$
The total number of schools with F2, $|F2|$, is the sum of all regions within F2:
$|F2| = N(\{F2\}) + N(\{F1, F2\}) + N(\{F2, F3\}) + N(\{F2, F4\}) + N(\{F1, F2, F3\}) + N(\{F1, F2, F4\}) + N(\{F2, F3, F4\}) + N(\{F1, F2, F3, F4\})$
$313 = 30 + z + 26 + 45 + x + x + x + 40$
$313 = 141 + z + 3x$
$z + 3x = 172 \quad \cdots (2)$
Now we solve the system of linear equations (1) and (2).
Subtracting (1) from (2):
$(z + 3x) - (z + 2x) = 172 - 122$
$x = 50$
Substitute $x=50$ into equation (1):
$z + 2(50) = 122$
$z + 100 = 122$
$z = 22$
So, we have found that the number of schools with exactly three facilities is $x=50$, and the number of schools with only F1 and F2 is $z=22$.
Next, we use the condition $|F1| = |F4|$ to find $y$.
Let's write the expression for $|F1|$:
$|F1| = N(\{F1\}) + N(\{F1, F2\}) + N(\{F1, F3\}) + N(\{F1, F4\}) + N(\{F1, F2, F3\}) + N(\{F1, F2, F4\}) + N(\{F1, F3, F4\}) + N(\{F1, F2, F3, F4\})$
$|F1| = 25 + z + y + w + x + x + x + 40$
$|F1| = 25 + 22 + y + w + 50 + 50 + 50 + 40$
$|F1| = 237 + y + w$
Now, let's write the expression for $|F4|$:
$|F4| = N(\{F4\}) + N(\{F1, F4\}) + N(\{F2, F4\}) + N(\{F3, F4\}) + N(\{F1, F2, F4\}) + N(\{F1, F3, F4\}) + N(\{F2, F3, F4\}) + N(\{F1, F2, F3, F4\})$
$|F4| = 20 + w + 45 + 24 + x + x + x + 40$
$|F4| = 20 + w + 45 + 24 + 50 + 50 + 50 + 40$
$|F4| = 279 + w$
Given $|F1| = |F4|$:
$237 + y + w = 279 + w$
$237 + y = 279$
$y = 279 - 237$
$y = 42$
The number of schools having only facilities F1 and F3 is $y$.