#include <bits/stdc++.h>
using namespace std;
void testCase() {}
vector<int> graph[1000001];
int dist[1000001];
bool visited[1000001];
bool multiple[1000001];
int p[1000001];
int main() {
  int n, m, k;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    graph[b].push_back(a);
  }
  cin >> k;
  for (int i = 1; i <= k; i++) {
    cin >> p[i];
  }
  for (int i = 1; i <= n; i++) {
    if (i != p[k]) dist[i] = 1e9;
  }
  vector<int> jono;
  jono.push_back(p[k]);
  visited[p[k]] = true;
  for (int i = 0; i < jono.size(); i++) {
    int node = jono[i];
    for (int x : graph[node]) {
      if (visited[x]) {
        if (dist[x] == dist[node] + 1) {
          multiple[x] = true;
        }
        continue;
      }
      jono.push_back(x);
      visited[x] = true;
      dist[x] = dist[node] + 1;
    }
  }
  int suurin = 0;
  int pienin = 0;
  for (int i = 2; i <= k; i++) {
    if (dist[p[i]] != dist[p[i - 1]] - 1) {
      pienin++;
      suurin++;
    } else if (multiple[p[i - 1]]) {
      suurin++;
    }
  }
  cout << pienin << " " << suurin << "\n";
}
