lemma

0

0 votes
Permutation and combination
Problem

A famous coder of IIIT Vadodara nicknamed not_false is working on proving a theorem. Before he started his work, a friend of his challenged him to solve a problem, he is working for. This is the lemma -

You are given a graph G having N vertices numbered 1 to N. There is an edge between two vertices i and j (1i, jN) iff

  • |ij| is prime
  •  min(i,j) is divisible by |ij|

Your task is simple. Find the number of components in the given graph G. Also, find the number of edges.

CONSTRAINTS

1N105

INPUT FORMAT

A single line containing a single integer N

OUTPUT FORMAT

Print two lines, each containing a single integer. The first line contains the number of edges and the second line contains the number of components of the graph.

Time Limit: 0.3
Memory Limit: 256
Source Limit:
Explanation

As there is only one vertex in the graph, there is simply no edge int he graph. The only point in the graph form a single connected component.
So "0" is the number of edges and "1" is the number of connected components.

Editor Image

?