I have a large CSV file with following line format:

```
c1,c2

```

I would like to split the original file in two files as follows:

1. One file will contain the lines where the value of c1 appears exactly once in the file.
2. Another file will contain the lines where the value of c1 appears twice or more in the file.

Any idea how it can be done?

For example, if the original file is:

```
1,foo
2,bar
3,foo
4,bar
2,foo
1,bar

```

I would like to produce the following files:

```
3,foo
4,bar

```

and

```
1,foo
2,bar
2,foo
1,bar

```