Study the given table and answer the question that follows.
The table shows the number of candidates who appeared (both male and female) in a Public Examination and the percentage of those who qualified in the examination from two states M and N. A few values are missing in the table (indicated by ------). You will be required to fill them up according to the question.
| Year | State M | State N | ||
| Number of appeared candidates | Percentage of qualified candidates | Number of appeared candidates | Percentage of qualified candidates | |
| 2002 | 540 | 80 | ------ | 60 |
| 2003 | 660 | 70 | ------ | 65 |
| 2004 | -------- | 90 | 850 | 70 |
| 2005 | 550 | 60 | 780 | 95 |
| 2006 | 980 | ------ | 860 | ------ |
If the total number of candidates appeared from State M is 3500 from 2002 to 2006, then what was the number of candidates who qualified from State M in 2004?