#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast")
#pragma GCC optimization("unroll-loops")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n / 2; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << i << " " << j << '\n';
      cout << n - i + 1 << " " << m - j + 1 << '\n';
    }
  }
  if (n % 2 == 1) {
    long long row = n / 2 + 1;
    for (long long i = 1; i <= m / 2; i++) {
      cout << row << " " << i << '\n';
      cout << row << " " << m - i + 1 << '\n';
    }
    if (m % 2 == 1) cout << row << " " << m / 2 + 1 << '\n';
  }
}
