google sheets – Cross-comparison of values ​​between two columns for voting purposes

The current content of our Google form is formatted as follows:

- PERSON 1 | PERSON 2 | YES
- PERSON 1 | PERSON 3 | YES
- PERSON 2 | PERSON 1 | YES
- PERSON 2 | PERSON 3 | YES
- PERSON 3 | PERSON 1 | NO
- PERSON 3 | PERSON 2 | NO

and we need our content to be formatted as such:

- _________ | PERSON 1 | PERSON 2 | PERSON 3 |
- PERSON 1 | X | YES YES
- PERSON 2 | YES X | YES
- PERSON 3 | NO | NO | X |

Is there a simple way to do this using Google Sheets?